< prev index next >
src/java.base/share/classes/java/util/concurrent/LinkedBlockingDeque.java
Print this page
*** 835,844 ****
--- 835,845 ----
* @throws NullPointerException if the specified collection or any
* of its elements are null
* @throws IllegalArgumentException if the collection is this deque
* @throws IllegalStateException if this deque is full
* @see #add(Object)
+ * @since 9
*/
public boolean addAll(Collection<? extends E> c) {
if (c == this)
// As historically specified in AbstractQueue#addAll
throw new IllegalArgumentException();
*** 1283,1292 ****
--- 1284,1294 ----
return new LBDSpliterator();
}
/**
* @throws NullPointerException {@inheritDoc}
+ * @since 9
*/
public void forEach(Consumer<? super E> action) {
Objects.requireNonNull(action);
forEachFrom(action, null);
}
*** 1325,1350 ****
--- 1327,1355 ----
} while (n > 0 && p != null);
}
/**
* @throws NullPointerException {@inheritDoc}
+ * @since 9
*/
public boolean removeIf(Predicate<? super E> filter) {
Objects.requireNonNull(filter);
return bulkRemove(filter);
}
/**
* @throws NullPointerException {@inheritDoc}
+ * @since 9
*/
public boolean removeAll(Collection<?> c) {
Objects.requireNonNull(c);
return bulkRemove(e -> c.contains(e));
}
/**
* @throws NullPointerException {@inheritDoc}
+ * @since 9
*/
public boolean retainAll(Collection<?> c) {
Objects.requireNonNull(c);
return bulkRemove(e -> !c.contains(e));
}
< prev index next >