Methods Summary |
---|
protected void | setUp()
super.setUp();
sSet = new TreeSet<Integer>();
for (int i = ITERATIONS - 1; i >= 0; i--) {
sSet.add(i);
}
|
public int | startPerformance(PerformanceTestCase.Intermediates intermediates)
intermediates.setInternalIterations(ITERATIONS);
return 0;
|
public void | testTreeSetAdd()Tests performance for the java.util.TreeSet method Add(Object arg 0)
TreeSet<Integer> set = new TreeSet();
for (int i = ITERATIONS - 1; i >= 0; i--) {
set.add(i);
set.add(i);
set.add(i);
set.add(i);
set.add(i);
set.add(i);
set.add(i);
set.add(i);
set.add(i);
set.add(i);
}
|
public void | testTreeSetClone()Tests performance for the java.util.TreeSet method - clone()
Object obj;
TreeSet<Integer> set = sSet;
for (int i = ITERATIONS - 1; i >= 0; i--) {
obj = set.clone();
obj = set.clone();
obj = set.clone();
obj = set.clone();
obj = set.clone();
obj = set.clone();
obj = set.clone();
obj = set.clone();
obj = set.clone();
obj = set.clone();
}
|
public void | testTreeSetComparator()Tests performance for the java.util.TreeSet method - comparator()
Comparator comparator;
TreeSet<Integer> set = sSet;
for (int i = ITERATIONS - 1; i >= 0; i--) {
comparator = set.comparator();
comparator = set.comparator();
comparator = set.comparator();
comparator = set.comparator();
comparator = set.comparator();
comparator = set.comparator();
comparator = set.comparator();
comparator = set.comparator();
comparator = set.comparator();
}
|
public void | testTreeSetContains()Tests performance of the java.util.TreeSet method- contains(Object arg0)
Integer index = new Integer(500);
boolean flag;
TreeSet<Integer> set = sSet;
for (int i = ITERATIONS - 1; i >= 0; i--) {
flag = set.contains(index);
flag = set.contains(index);
flag = set.contains(index);
flag = set.contains(index);
flag = set.contains(index);
flag = set.contains(index);
flag = set.contains(index);
flag = set.contains(index);
flag = set.contains(index);
}
|
public void | testTreeSetFirst()Tests performance for the java.util.TreeSet method - first()
int value;
TreeSet<Integer> set = sSet;
for (int i = ITERATIONS - 1; i >= 0; i--) {
value = set.first();
value = set.first();
value = set.first();
value = set.first();
value = set.first();
value = set.first();
value = set.first();
value = set.first();
value = set.first();
}
|
public void | testTreeSetHeadSet()Tests performance of the java.util.TreeSet method- headSet(Integer arg0)
Integer value = new Integer(100);
SortedSet set;
TreeSet<Integer> tSet = sSet;
for (int i = ITERATIONS - 1; i >= 0; i--) {
set = tSet.headSet(value);
set = tSet.headSet(value);
set = tSet.headSet(value);
set = tSet.headSet(value);
set = tSet.headSet(value);
set = tSet.headSet(value);
set = tSet.headSet(value);
set = tSet.headSet(value);
set = tSet.headSet(value);
set = tSet.headSet(value);
}
|
public void | testTreeSetIsEmpty()Tests performance for the java.util.TreeSet method - isEmpty()
boolean flag;
TreeSet<Integer> tSet = sSet;
for (int i = ITERATIONS - 1; i >= 0; i--) {
flag = tSet.isEmpty();
flag = tSet.isEmpty();
flag = tSet.isEmpty();
flag = tSet.isEmpty();
flag = tSet.isEmpty();
flag = tSet.isEmpty();
flag = tSet.isEmpty();
flag = tSet.isEmpty();
flag = tSet.isEmpty();
flag = tSet.isEmpty();
}
|
public void | testTreeSetIterator()Tests performance for the java.util.TreeSet method - iterator()
Iterator iterator;
TreeSet<Integer> set = sSet;
for (int i = ITERATIONS - 1; i >= 0; i--) {
iterator = set.iterator();
iterator = set.iterator();
iterator = set.iterator();
iterator = set.iterator();
iterator = set.iterator();
iterator = set.iterator();
iterator = set.iterator();
iterator = set.iterator();
iterator = set.iterator();
}
|
public void | testTreeSetLast()Tests performance for the java.util.TreeSet method - last()
int value;
TreeSet<Integer> set = sSet;
for (int i = ITERATIONS - 1; i >= 0; i--) {
value = set.last();
value = set.last();
value = set.last();
value = set.last();
value = set.last();
value = set.last();
value = set.last();
value = set.last();
value = set.last();
}
|
public void | testTreeSetRemove()Tests performance of the java.util.TreeSet method - remove(Object arg0)
TreeSet<Integer> set = new TreeSet(sSet);
for (int i = ITERATIONS - 1; i >= 0; i--) {
set.remove(i);
set.remove(i);
set.remove(i);
set.remove(i);
set.remove(i);
set.remove(i);
set.remove(i);
set.remove(i);
set.remove(i);
set.remove(i);
}
|
public void | testTreeSetSize()Tests performance for the java.util.TreeSet method - size()
int value;
TreeSet<Integer> set = sSet;
for (int i = ITERATIONS - 1; i >= 0; i--) {
value = set.size();
value = set.size();
value = set.size();
value = set.size();
value = set.size();
value = set.size();
value = set.size();
value = set.size();
value = set.size();
}
|
public void | testTreeSetSubSet()Tests performance of subSet(Integer arg0, Integer arg1) - TreeSet
Integer value = new Integer(400);
Integer nInt = new Integer(500);
SortedSet set;
TreeSet<Integer> tSet = sSet;
for (int i = ITERATIONS - 1; i >= 0; i--) {
set = tSet.subSet(value, nInt);
set = tSet.subSet(value, nInt);
set = tSet.subSet(value, nInt);
set = tSet.subSet(value, nInt);
set = tSet.subSet(value, nInt);
set = tSet.subSet(value, nInt);
set = tSet.subSet(value, nInt);
set = tSet.subSet(value, nInt);
set = tSet.subSet(value, nInt);
set = tSet.subSet(value, nInt);
}
|
public void | testTreeSetTailSet()Tests performance of tailSet(Integer arg0) - TreeSet
Integer value = new Integer(900);
SortedSet set;
TreeSet<Integer> tSet = sSet;
for (int i = ITERATIONS - 1; i >= 0; i--) {
set = tSet.tailSet(value);
set = tSet.tailSet(value);
set = tSet.tailSet(value);
set = tSet.tailSet(value);
set = tSet.tailSet(value);
set = tSet.tailSet(value);
set = tSet.tailSet(value);
set = tSet.tailSet(value);
set = tSet.tailSet(value);
set = tSet.tailSet(value);
}
|