--- jsr166/src/main/java/util/Deque.java 2017/05/06 06:55:50 1.37
+++ jsr166/src/main/java/util/Deque.java 2017/05/31 19:02:33 1.39
@@ -27,7 +27,7 @@ package java.util;
*
The twelve methods described above are summarized in the
* following table:
*
- *
+ *
* Summary of Deque methods
*
* |
@@ -70,7 +70,7 @@ package java.util;
* inherited from the {@code Queue} interface are precisely equivalent to
* {@code Deque} methods as indicated in the following table:
*
- *
+ *
* Comparison of Queue and Deque methods
*
* {@code Queue} Method |
@@ -108,7 +108,7 @@ package java.util;
* beginning of the deque. Stack methods are precisely equivalent to
* {@code Deque} methods as indicated in the table below:
*
- *
+ *
* Comparison of Stack and Deque methods
*
* Stack Method |
@@ -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 extends E> c);
// *** Stack methods ***