--- jsr166/src/main/java/util/Deque.java 2017/05/13 19:51:48 1.38 +++ jsr166/src/main/java/util/Deque.java 2017/05/31 19:02:33 1.39 @@ -448,6 +448,31 @@ public interface Deque extends Queue< */ E peek(); + /** + * Adds all of the elements in the specified collection at the end + * of this deque, as if by calling {@link #addLast} on each one, + * in the order that they are returned by the collection's iterator. + * + *

When using a capacity-restricted deque, it is generally preferable + * to call {@link #offer(Object) offer} separately on each element. + * + *

An exception encountered while trying to add an element may result + * in only some of the elements having been successfully added when + * the associated exception is thrown. + * + * @param c the elements to be inserted into this deque + * @return {@code true} if this deque changed as a result of the call + * @throws IllegalStateException if not all the elements can be added at + * this time due to insertion restrictions + * @throws ClassCastException if the class of an element of the specified + * collection prevents it from being added to this deque + * @throws NullPointerException if the specified collection contains a + * null element and this deque does not permit null elements, + * or if the specified collection is null + * @throws IllegalArgumentException if some property of an element of the + * specified collection prevents it from being added to this deque + */ + boolean addAll(Collection c); // *** Stack methods ***