Class Iterables.IteratingIterable<A>

  • All Implemented Interfaces:
    java.lang.Iterable<A>
    Enclosing class:
    Iterables

    static final class Iterables.IteratingIterable<A>
    extends java.lang.Object
    implements java.lang.Iterable<A>
    Infinite iterable that repeatedly applies f to start
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.function.Function<? super A,​? extends A> f  
      private A start  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private IteratingIterable​(java.util.function.Function<? super A,​? extends A> f, A start)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Iterator<A> 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
    • Field Detail

      • f

        private final java.util.function.Function<? super A,​? extends A> f
      • start

        private final A start
    • Constructor Detail

      • IteratingIterable

        private IteratingIterable​(java.util.function.Function<? super A,​? extends A> f,
                                  A start)
    • Method Detail

      • iterator

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