package saker.util
Iterator that concatenates other iterators.
This class takes an iterator of iterators during its construction, and will iterate over them after each other.
The iterator supports removals only if the iterator that returned the last element supports it.
TThe element type.
public | ConcatIterator( Creates a new instance. |
public ConcatIterator(Iterator<? extends Iterator<? extends T>> iterators ) throws NullPointerException
Creates a new instance.
iteratorsThe iterator of iterators that should be iterated over.
NullPointerExceptionIf the argument is
null
.Overridden from: Iterator
Returns the next element in the iteration.
the next element in the iteration
Overridden from: Iterator
Removes from the underlying collection the last element returned by this iterator (optional operation). This
method can be called only once per call to Iterator.next(). The behavior of an iterator is unspecified if the
underlying collection is modified while the iteration is in progress in any way other than by calling this
method.