List of utility methods to do Iterator
void | addAll(Collection dest, Iterator extends A> src) Adds all the elements from an iterator to a collection. while (src.hasNext())
dest.add(src.next());
|
void | addAll(Collection add All if (src != null) { while (src.hasNext()) { T value = src.next(); dest.add(value); |
C | addAll(final C collection, final Iterator adds all elements from iter to collection while (iter.hasNext()) { collection.add(iter.next()); return collection; |
void | addAll(final Collection super T> targetCollection, final Iterator extends T> sourceIterator) Adds all elements that a given Iterator provides to a given Collection of appropriate type while (sourceIterator.hasNext()) {
targetCollection.add(sourceIterator.next());
|
void | addAll(Iterator If the given Iterator is not null, iterate over all T elements in it and add them to the given Collection .
if (iteratorFrom != null) { while (iteratorFrom.hasNext()) { collectionTo.add(iteratorFrom.next()); |
U | addAll(Iterator Add all items in iterator to target collection while (source.hasNext()) { target.add(source.next()); return target; |
List | addAll(List target, Iterator source) add All if (source == null) return target; for (; source.hasNext(); target.add(source.next())) ; return target; |
void | addAll(Set s, Iterator i) add All while (i != null && i.hasNext()) {
s.add(i.next());
|
COLL | addAllFromIterator(COLL dest, Iterator extends ELEM> source) add All From Iterator while (source.hasNext()) { dest.add(source.next()); return dest; |
LinkedList | addAllToList(Iterator Adds all elements of iterator's range to a new linked list. LinkedList<T> result = new LinkedList<T>(); while (i.hasNext()) { result.add(i.next()); return result; |