Class Streams.EnumerationSpliterator<T>

java.lang.Object
java.util.Spliterators.AbstractSpliterator<T>
org.apache.commons.lang3.stream.Streams.EnumerationSpliterator<T>
Type Parameters:
T - The element type.
All Implemented Interfaces:
Spliterator<T>
Enclosing class:
Streams

private static final class Streams.EnumerationSpliterator<T> extends Spliterators.AbstractSpliterator<T>
Helps implement Streams.of(Enumeration).
  • Field Details

  • Constructor Details

    • EnumerationSpliterator

      protected EnumerationSpliterator(long estimatedSize, int additionalCharacteristics, Enumeration<T> enumeration)
      Creates a spliterator reporting the given estimated size and additionalCharacteristics.
      Parameters:
      estimatedSize - the estimated size of this spliterator if known, otherwise Long.MAX_VALUE.
      additionalCharacteristics - properties of this spliterator's source or elements. If SIZED is reported then this spliterator will additionally report SUBSIZED.
      enumeration - The Enumeration to wrap.
  • Method Details

    • forEachRemaining

      public void forEachRemaining(Consumer<? super T> action)
    • next

      private boolean next(Consumer<? super T> action)
    • tryAdvance

      public boolean tryAdvance(Consumer<? super T> action)