53 |
|
* Returns a new set of first 5 ints. |
54 |
|
*/ |
55 |
|
private static NavigableSet<Item> set5() { |
56 |
< |
ConcurrentSkipListSet<Item> q = new ConcurrentSkipListSet<Item>(); |
56 |
> |
ConcurrentSkipListSet<Item> q = new ConcurrentSkipListSet<>(); |
57 |
|
assertTrue(q.isEmpty()); |
58 |
|
q.add(one); |
59 |
|
q.add(two); |
71 |
|
* Returns a new set of first 5 negative ints. |
72 |
|
*/ |
73 |
|
private static NavigableSet<Item> dset5() { |
74 |
< |
ConcurrentSkipListSet<Item> q = new ConcurrentSkipListSet<Item>(); |
74 |
> |
ConcurrentSkipListSet<Item> q = new ConcurrentSkipListSet<>(); |
75 |
|
assertTrue(q.isEmpty()); |
76 |
|
q.add(minusOne); |
77 |
|
q.add(minusTwo); |
84 |
|
} |
85 |
|
|
86 |
|
private static NavigableSet<Item> set0() { |
87 |
< |
ConcurrentSkipListSet<Item> set = new ConcurrentSkipListSet<Item>(); |
87 |
> |
ConcurrentSkipListSet<Item> set = new ConcurrentSkipListSet<>(); |
88 |
|
assertTrue(set.isEmpty()); |
89 |
|
return set.tailSet(minusOne, true); |
90 |
|
} |
91 |
|
|
92 |
|
private static NavigableSet<Item> dset0() { |
93 |
< |
ConcurrentSkipListSet<Item> set = new ConcurrentSkipListSet<Item>(); |
93 |
> |
ConcurrentSkipListSet<Item> set = new ConcurrentSkipListSet<>(); |
94 |
|
assertTrue(set.isEmpty()); |
95 |
|
return set; |
96 |
|
} |
163 |
|
* Add of non-Comparable throws CCE |
164 |
|
*/ |
165 |
|
public void testAddNonComparable() { |
166 |
< |
ConcurrentSkipListSet<Object> src = new ConcurrentSkipListSet<Object>(); |
166 |
> |
ConcurrentSkipListSet<Object> src = new ConcurrentSkipListSet<>(); |
167 |
|
NavigableSet<Object> q = src.tailSet(minusOne, true); |
168 |
|
try { |
169 |
|
q.add(new Object()); |
660 |
|
* Add of non-Comparable throws CCE |
661 |
|
*/ |
662 |
|
public void testDescendingAddNonComparable() { |
663 |
< |
NavigableSet<Object> q = new ConcurrentSkipListSet<Object>(); |
663 |
> |
NavigableSet<Object> q = new ConcurrentSkipListSet<>(); |
664 |
|
try { |
665 |
|
q.add(new Object()); |
666 |
|
q.add(new Object()); |