448 |
|
*/ |
449 |
|
E peek(); |
450 |
|
|
451 |
+ |
/** |
452 |
+ |
* Adds all of the elements in the specified collection at the end |
453 |
+ |
* of this deque, as if by calling {@link #addLast} on each one, |
454 |
+ |
* in the order that they are returned by the collection's iterator. |
455 |
+ |
* |
456 |
+ |
* <p>When using a capacity-restricted deque, it is generally preferable |
457 |
+ |
* to call {@link #offer(Object) offer} separately on each element. |
458 |
+ |
* |
459 |
+ |
* <p>An exception encountered while trying to add an element may result |
460 |
+ |
* in only some of the elements having been successfully added when |
461 |
+ |
* the associated exception is thrown. |
462 |
+ |
* |
463 |
+ |
* @param c the elements to be inserted into this deque |
464 |
+ |
* @return {@code true} if this deque changed as a result of the call |
465 |
+ |
* @throws IllegalStateException if not all the elements can be added at |
466 |
+ |
* this time due to insertion restrictions |
467 |
+ |
* @throws ClassCastException if the class of an element of the specified |
468 |
+ |
* collection prevents it from being added to this deque |
469 |
+ |
* @throws NullPointerException if the specified collection contains a |
470 |
+ |
* null element and this deque does not permit null elements, |
471 |
+ |
* or if the specified collection is null |
472 |
+ |
* @throws IllegalArgumentException if some property of an element of the |
473 |
+ |
* specified collection prevents it from being added to this deque |
474 |
+ |
*/ |
475 |
+ |
boolean addAll(Collection<? extends E> c); |
476 |
|
|
477 |
|
// *** Stack methods *** |
478 |
|
|