Package org.infinispan.commons.util
Class FlattenSpliterator<E>
- java.lang.Object
-
- org.infinispan.commons.util.FlattenSpliterator<E>
-
- All Implemented Interfaces:
Spliterator<E>
public class FlattenSpliterator<E> extends Object implements 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
Constructors Constructor Description FlattenSpliterator(IntFunction<Collection<E>> toCollection, int length, int additionalCharacteristics)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
characteristics()
long
estimateSize()
void
forEachRemaining(Consumer<? super E> action)
boolean
tryAdvance(Consumer<? super E> action)
Spliterator<E>
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 Detail
-
FlattenSpliterator
public FlattenSpliterator(IntFunction<Collection<E>> toCollection, int length, int additionalCharacteristics)
-
-
Method Detail
-
tryAdvance
public boolean tryAdvance(Consumer<? super E> action)
- Specified by:
tryAdvance
in interfaceSpliterator<E>
-
forEachRemaining
public void forEachRemaining(Consumer<? super E> action)
- Specified by:
forEachRemaining
in interfaceSpliterator<E>
-
trySplit
public Spliterator<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>
-
-