Constructor and Description |
---|
CombinedIterator(Collection<Iterator<T>> iterators)
Constructs a
CombinedIterator from all of the iterators in the
provided collection. |
CombinedIterator(Iterator<T>... iterators)
Constructs a
CombinedIterator from all of the provided iterators. |
Modifier and Type | Method and Description |
---|---|
boolean |
hasNext()
Returns true if there are still elements in at least one of the backing
iterators.
|
static <T> Iterator<T> |
join(Collection<Iterable<T>> iterables)
Joins the iterators of all the provided iterables as one unified
iterator.
|
T |
next()
Returns the next element from some iterator.
|
void |
remove()
Removes the previously returned element using the backing iterator's
remove method. |
public CombinedIterator(Iterator<T>... iterators)
CombinedIterator
from all of the provided iterators.public CombinedIterator(Collection<Iterator<T>> iterators)
CombinedIterator
from all of the iterators in the
provided collection.public static <T> Iterator<T> join(Collection<Iterable<T>> iterables)
public boolean hasNext()
public T next()
Copyright © 2012. All Rights Reserved.