108 |
|
} |
109 |
|
|
110 |
|
/** |
111 |
< |
* pollFirst succeeds unless empty |
111 |
> |
* pollFirst succeeds unless empty |
112 |
|
*/ |
113 |
|
public void testPollFirst() { |
114 |
|
LinkedBlockingDeque q = populatedDeque(SIZE); |
119 |
|
} |
120 |
|
|
121 |
|
/** |
122 |
< |
* pollLast succeeds unless empty |
122 |
> |
* pollLast succeeds unless empty |
123 |
|
*/ |
124 |
|
public void testPollLast() { |
125 |
|
LinkedBlockingDeque q = populatedDeque(SIZE); |
130 |
|
} |
131 |
|
|
132 |
|
/** |
133 |
< |
* peekFirst returns next element, or null if empty |
133 |
> |
* peekFirst returns next element, or null if empty |
134 |
|
*/ |
135 |
|
public void testPeekFirst() { |
136 |
|
LinkedBlockingDeque q = populatedDeque(SIZE); |
144 |
|
} |
145 |
|
|
146 |
|
/** |
147 |
< |
* peek returns next element, or null if empty |
147 |
> |
* peek returns next element, or null if empty |
148 |
|
*/ |
149 |
|
public void testPeek() { |
150 |
|
LinkedBlockingDeque q = populatedDeque(SIZE); |
158 |
|
} |
159 |
|
|
160 |
|
/** |
161 |
< |
* peekLast returns next element, or null if empty |
161 |
> |
* peekLast returns next element, or null if empty |
162 |
|
*/ |
163 |
|
public void testPeekLast() { |
164 |
|
LinkedBlockingDeque q = populatedDeque(SIZE); |
188 |
|
} |
189 |
|
|
190 |
|
/** |
191 |
< |
* getLast() returns last element, or throws NSEE if empty |
191 |
> |
* getLast() returns last element, or throws NSEE if empty |
192 |
|
*/ |
193 |
|
public void testLastElement() { |
194 |
|
LinkedBlockingDeque q = populatedDeque(SIZE); |
234 |
|
} |
235 |
|
|
236 |
|
/** |
237 |
< |
* remove removes next element, or throws NSEE if empty |
237 |
> |
* remove removes next element, or throws NSEE if empty |
238 |
|
*/ |
239 |
|
public void testRemove() { |
240 |
|
LinkedBlockingDeque q = populatedDeque(SIZE); |
457 |
|
|
458 |
|
|
459 |
|
/** |
460 |
< |
* pop removes next element, or throws NSEE if empty |
460 |
> |
* pop removes next element, or throws NSEE if empty |
461 |
|
*/ |
462 |
|
public void testPop() { |
463 |
|
LinkedBlockingDeque q = populatedDeque(SIZE); |
967 |
|
} |
968 |
|
|
969 |
|
/** |
970 |
< |
* timed pollFirst before a delayed offerFirst fails; after offerFirst succeeds; |
971 |
< |
* on interruption throws |
970 |
> |
* timed pollFirst before a delayed offerFirst fails; after offerFirst succeeds; |
971 |
> |
* on interruption throws |
972 |
|
*/ |
973 |
|
public void testTimedPollFirstWithOfferFirst() throws InterruptedException { |
974 |
|
final LinkedBlockingDeque q = new LinkedBlockingDeque(2); |
1417 |
|
|
1418 |
|
|
1419 |
|
/** |
1420 |
< |
* Descending iterator iterates through all elements |
1420 |
> |
* Descending iterator iterates through all elements |
1421 |
|
*/ |
1422 |
|
public void testDescendingIterator() { |
1423 |
|
LinkedBlockingDeque q = populatedDeque(SIZE); |
1436 |
|
} |
1437 |
|
|
1438 |
|
/** |
1439 |
< |
* Descending iterator ordering is reverse FIFO |
1439 |
> |
* Descending iterator ordering is reverse FIFO |
1440 |
|
*/ |
1441 |
|
public void testDescendingIteratorOrdering() { |
1442 |
|
final LinkedBlockingDeque q = new LinkedBlockingDeque(); |
1645 |
|
} |
1646 |
|
|
1647 |
|
/** |
1648 |
< |
* drainTo(c, n) empties first max {n, size} elements of deque into c |
1648 |
> |
* drainTo(c, n) empties first min(n, size) elements of queue into c |
1649 |
|
*/ |
1650 |
|
public void testDrainToN() { |
1651 |
|
LinkedBlockingDeque q = new LinkedBlockingDeque(); |