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.*; |
521 |
|
TreeSet q = populatedSet(SIZE); |
522 |
|
String s = q.toString(); |
523 |
|
for (int i = 0; i < SIZE; ++i) { |
524 |
< |
assertTrue(s.indexOf(String.valueOf(i)) >= 0); |
524 |
> |
assertTrue(s.contains(String.valueOf(i))); |
525 |
|
} |
526 |
|
} |
527 |
|
|
850 |
|
*/ |
851 |
|
void check(NavigableSet<Integer> set, |
852 |
|
final int min, final int max, final boolean ascending) { |
853 |
< |
class ReferenceSet { |
853 |
> |
class ReferenceSet { |
854 |
|
int lower(int element) { |
855 |
|
return ascending ? |
856 |
|
lowerAscending(element) : higherAscending(element); |