Class DelegatingIterable<E>

  • All Implemented Interfaces:
    java.lang.Iterable<E>
    Direct Known Subclasses:
    Ascending, Descending, Distinct, Expanded, First, Mapped, Numbered, Paired, PresentValues, Zipped

    public abstract class DelegatingIterable<E>
    extends java.lang.Object
    implements java.lang.Iterable<E>
    An abstract Iterable which delegates all method calls to another given Iterable.

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

    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected DelegatingIterable​(java.lang.Iterable<E> delegate)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Iterator<E> iterator()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.lang.Iterable

        forEach, spliterator
    • Constructor Detail

      • DelegatingIterable

        protected DelegatingIterable​(java.lang.Iterable<E> delegate)
    • Method Detail

      • iterator

        public final java.util.Iterator<E> iterator()
        Specified by:
        iterator in interface java.lang.Iterable<E>