Class CompoundIterator<T>

  • Type Parameters:
    T - the type of iterator
    All Implemented Interfaces:
    Iterator<T>

    public class CompoundIterator<T>
    extends Object
    implements Iterator<T>
    Provides an iterator for a collection of iterables.
    • Constructor Detail

      • CompoundIterator

        public CompoundIterator​(Iterable<? extends Iterable<T>> iterables)
        Creates a new compound iterator.
        Parameters:
        iterables - the iterables to use in this iterator
    • Method Detail

      • hasNext

        public boolean hasNext()
        Specified by:
        hasNext in interface Iterator<T>
      • next

        public T next()
        Specified by:
        next in interface Iterator<T>
      • remove

        public void remove()
        Specified by:
        remove in interface Iterator<T>