311 |
|
|
312 |
|
/** |
313 |
|
* Version of remove using reference equality, not equals. |
314 |
< |
* Needed by iterator.remove |
314 |
> |
* Needed by iterator.remove. |
315 |
|
* |
316 |
|
* @param o element to be removed from this queue, if present |
317 |
< |
* @return <tt>true</tt> if removed. |
317 |
> |
* @return <tt>true</tt> if removed |
318 |
|
*/ |
319 |
|
boolean removeEq(Object o) { |
320 |
|
for (int i = 0; i < size; i++) { |
346 |
|
* maintained by this list. (In other words, this method must allocate |
347 |
|
* a new array). The caller is thus free to modify the returned array. |
348 |
|
* |
349 |
< |
* @return an array containing all of the elements in this queue. |
349 |
> |
* @return an array containing all of the elements in this queue |
350 |
|
*/ |
351 |
|
public Object[] toArray() { |
352 |
|
return Arrays.copyOf(queue, size); |