Package org.infinispan.commons.util
Class FlattenSpliterator<E>
java.lang.Object
org.infinispan.commons.util.FlattenSpliterator<E>
- All Implemented Interfaces:
Spliterator<E>
Composes an array of Collections into a spliterator. This spliterator will only split up to the collection and will
not split the spliterator from the collection itself.
- Since:
- 9.3
- Author:
- wburns
-
Nested Class Summary
Nested classes/interfaces inherited from interface java.util.Spliterator
Spliterator.OfDouble, Spliterator.OfInt, Spliterator.OfLong, Spliterator.OfPrimitive<T extends Object,
T_CONS extends Object, T_SPLITR extends Spliterator.OfPrimitive<T, T_CONS, T_SPLITR>> -
Field Summary
Fields inherited from interface java.util.Spliterator
CONCURRENT, DISTINCT, IMMUTABLE, NONNULL, ORDERED, SIZED, SORTED, SUBSIZED
-
Constructor Summary
ConstructorDescriptionFlattenSpliterator
(IntFunction<Collection<E>> toCollection, int length, int additionalCharacteristics) -
Method Summary
Modifier and TypeMethodDescriptionint
long
void
forEachRemaining
(Consumer<? super E> action) boolean
tryAdvance
(Consumer<? super E> action) 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
-
Constructor Details
-
FlattenSpliterator
public FlattenSpliterator(IntFunction<Collection<E>> toCollection, int length, int additionalCharacteristics)
-
-
Method Details
-
tryAdvance
- Specified by:
tryAdvance
in interfaceSpliterator<E>
-
forEachRemaining
- Specified by:
forEachRemaining
in interfaceSpliterator<E>
-
trySplit
- Specified by:
trySplit
in interfaceSpliterator<E>
-
estimateSize
public long estimateSize()- Specified by:
estimateSize
in interfaceSpliterator<E>
-
characteristics
public int characteristics()- Specified by:
characteristics
in interfaceSpliterator<E>
-