Class Iterables.IterableEnumeration<T,​R>

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

    static final class Iterables.IterableEnumeration<T,​R>
    extends java.lang.Object
    implements java.lang.Iterable<R>
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.concurrent.atomic.AtomicBoolean consume  
      private java.util.Enumeration<? extends T> enumeration  
      private java.util.function.Predicate<? super R> filter  
      private java.util.function.Function<? super T,​? extends R> mapper  
    • Constructor Summary

      Constructors 
      Constructor Description
      IterableEnumeration​(java.util.Enumeration<? extends T> enumeration, java.util.function.Function<? super T,​? extends R> mapper, java.util.function.Predicate<? super R> filter)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private void consume()  
      void forEach​(java.util.function.Consumer<? super R> action)  
      java.util.Iterator<R> iterator()  
      java.util.Spliterator<R> spliterator()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • enumeration

        private final java.util.Enumeration<? extends T> enumeration
      • mapper

        private final java.util.function.Function<? super T,​? extends R> mapper
      • filter

        private final java.util.function.Predicate<? super R> filter
      • consume

        private final java.util.concurrent.atomic.AtomicBoolean consume
    • Constructor Detail

      • IterableEnumeration

        IterableEnumeration​(java.util.Enumeration<? extends T> enumeration,
                            java.util.function.Function<? super T,​? extends R> mapper,
                            java.util.function.Predicate<? super R> filter)
    • Method Detail

      • consume

        private void consume()
      • forEach

        public void forEach​(java.util.function.Consumer<? super R> action)
        Specified by:
        forEach in interface java.lang.Iterable<T>
      • iterator

        public java.util.Iterator<R> iterator()
        Specified by:
        iterator in interface java.lang.Iterable<T>
      • spliterator

        public java.util.Spliterator<R> spliterator()
        Specified by:
        spliterator in interface java.lang.Iterable<T>