< prev index next >
src/java.base/share/classes/java/util/concurrent/LinkedTransferQueue.java
Print this page
@@ -887,10 +887,11 @@
*
* <p>This method acts as bridge between array-based and collection-based
* APIs.
*
* @return an array containing all of the elements in this queue
+ * @since 9
*/
public Object[] toArray() {
return toArrayInternal(null);
}
@@ -926,10 +927,11 @@
* @return an array containing all of the elements in this queue
* @throws ArrayStoreException if the runtime type of the specified array
* is not a supertype of the runtime type of every element in
* this queue
* @throws NullPointerException if the specified array is null
+ * @since 9
*/
@SuppressWarnings("unchecked")
public <T> T[] toArray(T[] a) {
Objects.requireNonNull(a);
return (T[]) toArrayInternal(a);
@@ -1617,26 +1619,29 @@
tail = t;
}
/**
* @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));
}
@@ -1715,10 +1720,11 @@
}
}
/**
* @throws NullPointerException {@inheritDoc}
+ * @since 9
*/
public void forEach(Consumer<? super E> action) {
Objects.requireNonNull(action);
forEachFrom(action, head);
}
< prev index next >