public final class Iterators extends Object
| Modifier and Type | Method and Description |
|---|---|
static <T> boolean |
addAll(Collection<T> addTo,
Iterator<? extends T> iterator)
Adds all elements in
iterator to collection. |
public static <T> boolean addAll(Collection<T> addTo, Iterator<? extends T> iterator)
iterator to collection. The iterator
will be left exhausted: its hasNext() method will return
false.T - generic type of collectionaddTo - collection to add toiterator - iterator whose elements will be added to the collectiontrue if collection was modified as a result of
this operationCopyright © 2013–2018. All rights reserved.