Package org.apache.commons.lang3.stream
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)
.-
Nested Class Summary
Nested classes/interfaces inherited from interface java.util.Spliterator
Spliterator.OfDouble, Spliterator.OfInt, Spliterator.OfLong, Spliterator.OfPrimitive<T,
T_CONS, T_SPLITR extends Spliterator.OfPrimitive<T, T_CONS, T_SPLITR>> -
Field Summary
FieldsFields inherited from interface java.util.Spliterator
CONCURRENT, DISTINCT, IMMUTABLE, NONNULL, ORDERED, SIZED, SORTED, SUBSIZED
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
EnumerationSpliterator
(long estimatedSize, int additionalCharacteristics, Enumeration<T> enumeration) Creates a spliterator reporting the given estimated size and additionalCharacteristics. -
Method Summary
Modifier and TypeMethodDescriptionvoid
forEachRemaining
(Consumer<? super T> action) private boolean
boolean
tryAdvance
(Consumer<? super T> action) Methods inherited from class java.util.Spliterators.AbstractSpliterator
characteristics, estimateSize, trySplit
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Spliterator
getComparator, getExactSizeIfKnown, hasCharacteristics
-
Field Details
-
enumeration
-
-
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, otherwiseLong.MAX_VALUE
.additionalCharacteristics
- properties of this spliterator's source or elements. IfSIZED
is reported then this spliterator will additionally reportSUBSIZED
.enumeration
- The Enumeration to wrap.
-
-
Method Details
-
forEachRemaining
-
next
-
tryAdvance
-