Class DelegatingIterator<E>

  • All Implemented Interfaces:
    java.util.Iterator<E>
    Direct Known Subclasses:
    Distinct, Paired

    public abstract class DelegatingIterator<E>
    extends BaseIterator<E>
    An abstract Iterator which delegates all method calls to another given Iterator.

    This class is abstract and is meant to be a convenient way of composing Iterators despite the lack of native support for the decoration pattern in Java.

    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected DelegatingIterator​(java.util.Iterator<E> delegate)  
    • 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

      • DelegatingIterator

        protected DelegatingIterator​(java.util.Iterator<E> delegate)
    • Method Detail

      • hasNext

        public final boolean hasNext()
      • next

        public final E next()