1 |
|
/* |
2 |
|
* Written by Doug Lea with assistance from members of JCP JSR-166 |
3 |
|
* Expert Group and released to the public domain, as explained at |
4 |
< |
* http://creativecommons.org/licenses/publicdomain |
4 |
> |
* http://creativecommons.org/publicdomain/zero/1.0/ |
5 |
|
*/ |
6 |
|
|
7 |
|
import junit.framework.*; |
269 |
|
assertNull(q.pollFirst()); |
270 |
|
} |
271 |
|
|
272 |
– |
|
272 |
|
/** |
273 |
|
* remove(x) removes x and returns true if present |
274 |
|
*/ |
365 |
|
} |
366 |
|
} |
367 |
|
|
369 |
– |
|
370 |
– |
|
368 |
|
/** |
369 |
|
* lower returns preceding element |
370 |
|
*/ |
506 |
|
assertFalse(it.hasNext()); |
507 |
|
} |
508 |
|
|
512 |
– |
|
509 |
|
/** |
510 |
|
* toString contains toStrings of elements |
511 |
|
*/ |
513 |
|
ConcurrentSkipListSet q = populatedSet(SIZE); |
514 |
|
String s = q.toString(); |
515 |
|
for (int i = 0; i < SIZE; ++i) { |
516 |
< |
assertTrue(s.indexOf(String.valueOf(i)) >= 0); |
516 |
> |
assertTrue(s.contains(String.valueOf(i))); |
517 |
|
} |
518 |
|
} |
519 |
|
|
842 |
|
*/ |
843 |
|
void check(NavigableSet<Integer> set, |
844 |
|
final int min, final int max, final boolean ascending) { |
845 |
< |
class ReferenceSet { |
845 |
> |
class ReferenceSet { |
846 |
|
int lower(int element) { |
847 |
|
return ascending ? |
848 |
|
lowerAscending(element) : higherAscending(element); |