30 |
|
} |
31 |
|
class ComparatorImplementation implements CollectionImplementation { |
32 |
|
public Class<?> klazz() { return PriorityQueue.class; } |
33 |
< |
public Collection emptyCollection() { return new PriorityQueue(new MyReverseComparator()); } |
33 |
> |
public Collection emptyCollection() { |
34 |
> |
return new PriorityQueue(new MyReverseComparator()); |
35 |
> |
} |
36 |
|
public Object makeElement(int i) { return i; } |
37 |
|
public boolean isConcurrent() { return false; } |
38 |
|
public boolean permitsNulls() { return false; } |
39 |
|
} |
40 |
< |
return newTestSuite(PriorityQueueTest.class, |
41 |
< |
CollectionTest.testSuite(new Implementation()), |
42 |
< |
CollectionTest.testSuite(new ComparatorImplementation())); |
40 |
> |
return newTestSuite( |
41 |
> |
PriorityQueueTest.class, |
42 |
> |
CollectionTest.testSuite(new Implementation()), |
43 |
> |
CollectionTest.testSuite(new ComparatorImplementation())); |
44 |
|
} |
45 |
|
|
46 |
|
static class MyReverseComparator implements Comparator, java.io.Serializable { |