< prev index next >
src/java.base/share/classes/java/util/concurrent/ArrayBlockingQueue.java
Print this page
@@ -1439,10 +1439,11 @@
Spliterator.CONCURRENT));
}
/**
* @throws NullPointerException {@inheritDoc}
+ * @since 9
*/
public void forEach(Consumer<? super E> action) {
Objects.requireNonNull(action);
final ReentrantLock lock = this.lock;
lock.lock();
@@ -1462,26 +1463,29 @@
}
}
/**
* @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 >