Class CombinedIterator<T>

java.lang.Object
ch.njol.util.coll.iterator.CombinedIterator<T>
All Implemented Interfaces:
Iterator<T>

public class CombinedIterator<T> extends Object implements Iterator<T>
An iterator that iterates over all elements of several iterables.

Elements are removable from this iterator if the source iterables support element removal, unless removal is blocked on creation.

  • Constructor Details

    • CombinedIterator

      public CombinedIterator(Iterator<? extends Iterable<T>> iterators)
    • CombinedIterator

      public CombinedIterator(Iterator<? extends Iterable<T>> iterators, boolean removable)
  • Method Details

    • hasNext

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

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

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