50 |
|
* Iterator} interfaces. |
51 |
|
* |
52 |
|
* <p>This class is a member of the |
53 |
< |
* <a href="{@docRoot}/../technotes/guides/collections/index.html"> |
53 |
> |
* <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework"> |
54 |
|
* Java Collections Framework</a>. |
55 |
|
* |
56 |
|
* @author Josh Bloch and Doug Lea |
313 |
|
/** |
314 |
|
* Adds all of the elements in the specified collection at the end |
315 |
|
* of this deque, as if by calling {@link #addLast} on each one, |
316 |
< |
* in the order that they are returned by the collection's |
317 |
< |
* iterator. |
316 |
> |
* in the order that they are returned by the collection's iterator. |
317 |
|
* |
318 |
|
* @param c the elements to be inserted into this deque |
319 |
|
* @return {@code true} if this deque changed as a result of the call |
519 |
|
/** |
520 |
|
* Retrieves and removes the head of the queue represented by this deque. |
521 |
|
* |
522 |
< |
* This method differs from {@link #poll poll} only in that it throws an |
523 |
< |
* exception if this deque is empty. |
522 |
> |
* This method differs from {@link #poll() poll()} only in that it |
523 |
> |
* throws an exception if this deque is empty. |
524 |
|
* |
525 |
|
* <p>This method is equivalent to {@link #removeFirst}. |
526 |
|
* |
887 |
|
} |
888 |
|
} |
889 |
|
|
890 |
+ |
/** |
891 |
+ |
* @throws NullPointerException {@inheritDoc} |
892 |
+ |
*/ |
893 |
|
public void forEach(Consumer<? super E> action) { |
894 |
|
Objects.requireNonNull(action); |
895 |
|
final Object[] es = elements; |