4 |
|
*/ |
5 |
|
|
6 |
|
package java.util; |
7 |
+ |
import java.util.*; // for javadoc |
8 |
|
import java.io.*; |
9 |
|
|
10 |
|
/** |
203 |
|
|
204 |
|
/** |
205 |
|
* Inserts the specified element at the end of this deque. |
206 |
< |
* This method is equivalent to {@link #add} and {@link #push}. |
206 |
> |
* |
207 |
> |
* <p>This method is equivalent to {@link #add}. |
208 |
|
* |
209 |
|
* @param e the element to add |
210 |
|
* @throws NullPointerException if the specified element is null |
315 |
|
* If the deque does not contain the element, it is unchanged. |
316 |
|
* More formally, removes the first element <tt>e</tt> such that |
317 |
|
* <tt>o.equals(e)</tt> (if such an element exists). |
318 |
< |
* Returns true if this deque contained the specified element (or |
319 |
< |
* equivalently, if this deque changed as a result of the call). |
318 |
> |
* Returns <tt>true</tt> if this deque contained the specified element |
319 |
> |
* (or equivalently, if this deque changed as a result of the call). |
320 |
|
* |
321 |
|
* @param o element to be removed from this deque, if present |
322 |
|
* @return <tt>true</tt> if the deque contained the specified element |
343 |
|
* If the deque does not contain the element, it is unchanged. |
344 |
|
* More formally, removes the last element <tt>e</tt> such that |
345 |
|
* <tt>o.equals(e)</tt> (if such an element exists). |
346 |
< |
* Returns true if this deque contained the specified element (or |
347 |
< |
* equivalently, if this deque changed as a result of the call). |
346 |
> |
* Returns <tt>true</tt> if this deque contained the specified element |
347 |
> |
* (or equivalently, if this deque changed as a result of the call). |
348 |
|
* |
349 |
|
* @param o element to be removed from this deque, if present |
350 |
|
* @return <tt>true</tt> if the deque contained the specified element |
615 |
|
* If the deque does not contain the element, it is unchanged. |
616 |
|
* More formally, removes the first element <tt>e</tt> such that |
617 |
|
* <tt>o.equals(e)</tt> (if such an element exists). |
618 |
< |
* Returns true if this deque contained the specified element (or |
619 |
< |
* equivalently, if this deque changed as a result of the call). |
618 |
> |
* Returns <tt>true</tt> if this deque contained the specified element |
619 |
> |
* (or equivalently, if this deque changed as a result of the call). |
620 |
|
* |
621 |
|
* <p>This method is equivalent to {@link #removeFirstOccurrence}. |
622 |
|
* |
652 |
|
* <p>The returned array will be "safe" in that no references to it are |
653 |
|
* maintained by this deque. (In other words, this method must allocate |
654 |
|
* a new array). The caller is thus free to modify the returned array. |
655 |
< |
* |
655 |
> |
* |
656 |
|
* <p>This method acts as bridge between array-based and collection-based |
657 |
|
* APIs. |
658 |
|
* |