< prev index next >

src/java.base/share/classes/java/util/concurrent/LinkedTransferQueue.java

Print this page

        

*** 887,896 **** --- 887,897 ---- * * <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,935 **** --- 927,937 ---- * @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,1642 **** --- 1619,1647 ---- 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,1724 **** --- 1720,1730 ---- } } /** * @throws NullPointerException {@inheritDoc} + * @since 9 */ public void forEach(Consumer<? super E> action) { Objects.requireNonNull(action); forEachFrom(action, head); }
< prev index next >