Class Concat<E>

  • All Implemented Interfaces:
    java.util.Iterator<E>

    public final class Concat<E>
    extends BaseIterator<E>
    An Iterator that concatenates the results of other Iterators. This means, it iterates the elements of each Iterator before moving on to the next Iterator.
    • Constructor Summary

      Constructors 
      Constructor Description
      Concat​(java.util.Iterator<E>... iterators)
      Constructor of an Iterator that serializes the elements of other Iterators.
      Concat​(java.util.Iterator<java.util.Iterator<E>> iteratorIterator)
      Constructor of an Iterator that serializes the elements of the Iterators iterated by the given Iterator.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean hasNext()  
      E next()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.Iterator

        forEachRemaining
    • Constructor Detail

      • Concat

        @SafeVarargs
        public Concat​(java.util.Iterator<E>... iterators)
        Constructor of an Iterator that serializes the elements of other Iterators.
        Parameters:
        iterators - An array of Iterators.
      • Concat

        public Concat​(java.util.Iterator<java.util.Iterator<E>> iteratorIterator)
        Constructor of an Iterator that serializes the elements of the Iterators iterated by the given Iterator.
        Parameters:
        iteratorIterator - An Iterator that iterates other iterators of type <E>.
    • Method Detail

      • hasNext

        public boolean hasNext()
      • next

        public E next()