Package org.dmfs.jems2.iterator
Class Concat<E>
- java.lang.Object
-
- org.dmfs.jems2.iterator.BaseIterator<E>
-
- org.dmfs.jems2.iterator.Concat<E>
-
- All Implemented Interfaces:
java.util.Iterator<E>
public final class Concat<E> extends BaseIterator<E>
AnIteratorthat concatenates the results of otherIterators. This means, it iterates the elements of eachIteratorbefore moving on to the nextIterator.
-
-
Constructor Summary
Constructors Constructor Description Concat(java.util.Iterator<E>... iterators)Constructor of anIteratorthat serializes the elements of otherIterators.Concat(java.util.Iterator<java.util.Iterator<E>> iteratorIterator)Constructor of anIteratorthat serializes the elements of theIterators iterated by the givenIterator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanhasNext()Enext()-
Methods inherited from class org.dmfs.jems2.iterator.BaseIterator
equals, hashCode, remove
-
-
-
-
Constructor Detail
-
Concat
@SafeVarargs public Concat(java.util.Iterator<E>... iterators)
Constructor of anIteratorthat serializes the elements of otherIterators.- Parameters:
iterators- An array ofIterators.
-
Concat
public Concat(java.util.Iterator<java.util.Iterator<E>> iteratorIterator)
Constructor of anIteratorthat serializes the elements of theIterators iterated by the givenIterator.- Parameters:
iteratorIterator- AnIteratorthat iterates other iterators of type <E>.
-
-
Method Detail
-
hasNext
public boolean hasNext()
-
next
public E next()
-
-