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.*; |
494 |
|
assertNull(q.peekLast()); |
495 |
|
} |
496 |
|
|
497 |
– |
|
497 |
|
/** |
498 |
|
* removeFirst() removes first element, or throws NSEE if empty |
499 |
|
*/ |
796 |
|
} |
797 |
|
} |
798 |
|
|
800 |
– |
|
799 |
|
/** |
800 |
|
* toString() contains toStrings of elements |
801 |
|
*/ |
803 |
|
ArrayDeque q = populatedDeque(SIZE); |
804 |
|
String s = q.toString(); |
805 |
|
for (int i = 0; i < SIZE; ++i) { |
806 |
< |
assertTrue(s.indexOf(String.valueOf(i)) >= 0); |
806 |
> |
assertTrue(s.contains(String.valueOf(i))); |
807 |
|
} |
808 |
|
} |
809 |
|
|