Class DelegatingIterator<E>

java.lang.Object
org.dmfs.jems2.iterator.BaseIterator<E>
org.dmfs.jems2.iterator.DelegatingIterator<E>
All Implemented Interfaces:
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 Details

    • DelegatingIterator

      protected DelegatingIterator(Iterator<E> delegate)
  • Method Details

    • hasNext

      public final boolean hasNext()
    • next

      public final E next()