Package com.gengoai.stream
Class ShuffleSpliterator<T>
- java.lang.Object
-
- com.gengoai.stream.ShuffleSpliterator<T>
-
- Type Parameters:
T
- the type parameter
- All Implemented Interfaces:
Spliterator<T>
public class ShuffleSpliterator<T> extends Object implements Spliterator<T>
The type Shuffle spliterator.
-
-
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 ShuffleSpliterator(@NonNull Spliterator<T> backing, @NonNull Random random)
Instantiates a new Shuffle spliterator.ShuffleSpliterator(Spliterator<T> backing)
Instantiates a new Shuffle spliterator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
characteristics()
long
estimateSize()
boolean
tryAdvance(Consumer<? super T> consumer)
Spliterator<T>
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
forEachRemaining, getComparator, getExactSizeIfKnown, hasCharacteristics
-
-
-
-
Constructor Detail
-
ShuffleSpliterator
public ShuffleSpliterator(Spliterator<T> backing)
Instantiates a new Shuffle spliterator.- Parameters:
backing
- the backing
-
ShuffleSpliterator
public ShuffleSpliterator(@NonNull @NonNull Spliterator<T> backing, @NonNull @NonNull Random random)
Instantiates a new Shuffle spliterator.- Parameters:
backing
- the backing
-
-
Method Detail
-
tryAdvance
public boolean tryAdvance(Consumer<? super T> consumer)
- Specified by:
tryAdvance
in interfaceSpliterator<T>
-
trySplit
public Spliterator<T> trySplit()
- Specified by:
trySplit
in interfaceSpliterator<T>
-
estimateSize
public long estimateSize()
- Specified by:
estimateSize
in interfaceSpliterator<T>
-
characteristics
public int characteristics()
- Specified by:
characteristics
in interfaceSpliterator<T>
-
-