public class LongIndexedSpliterator<T,S extends LongIndexedSpliterator<T,S>> extends java.lang.Object implements java.util.Spliterator<T>, Streamable<T,S>
Modifier | Constructor and Description |
---|---|
protected |
LongIndexedSpliterator(long origin,
long fence) |
Modifier and Type | Method and Description |
---|---|
java.math.BigInteger |
bigCount() |
int |
characteristics() |
long |
count() |
long |
estimateSize() |
void |
forEachRemaining(java.util.function.Consumer<? super T> action) |
protected long |
getFence() |
protected long |
getIndex() |
java.util.stream.Stream<T> |
parallelStream() |
S |
shuffle(java.util.Random rnd)
Configure this instance to provide streams that shuffle elements in the data source.
|
S |
skip(java.math.BigInteger bigN)
Configure this instance to provide streams that skip the first {}@code n} elements in the data source.
|
S |
skip(long n)
Configure this instance to provide streams that skip the first {}@code n} elements in the data source.
|
java.util.stream.Stream<T> |
stream() |
boolean |
tryAdvance(java.util.function.Consumer<? super T> action) |
java.util.Spliterator<T> |
trySplit() |
S |
withAdditionalCharacteristics(int additionalCharacteristics)
Adds
additionalCharacteristics to the provided streams. |
S |
withShuffler(LongShuffler shuffler)
Configures the shuffler of this source.
|
S |
withValueSupplier(Splittable.LongIndexed<T> valueSupplier)
Configures the value supplier of this source.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getComparator, getExactSizeIfKnown, hasCharacteristics
ordered, shuffle
public final S withAdditionalCharacteristics(int additionalCharacteristics)
Streamable
additionalCharacteristics
to the provided streams.withAdditionalCharacteristics
in interface Streamable<T,S extends LongIndexedSpliterator<T,S>>
public final S withShuffler(LongShuffler shuffler)
LongShuffler
implementation, you should use Streamable.shuffle()
or shuffle(Random)
instead of this method.public final S withValueSupplier(Splittable.LongIndexed<T> valueSupplier)
protected final long getIndex()
protected final long getFence()
public java.util.stream.Stream<T> stream()
stream
in interface Streamable<T,S extends LongIndexedSpliterator<T,S>>
Stream
public java.util.stream.Stream<T> parallelStream()
parallelStream
in interface Streamable<T,S extends LongIndexedSpliterator<T,S>>
Stream
public long count()
count
in interface Streamable<T,S extends LongIndexedSpliterator<T,S>>
public java.math.BigInteger bigCount()
bigCount
in interface Streamable<T,S extends LongIndexedSpliterator<T,S>>
public S skip(long n)
Streamable
Stream.skip(long)
.skip
in interface Streamable<T,S extends LongIndexedSpliterator<T,S>>
n
- the number of elements to be skipped (as a long).public S skip(java.math.BigInteger bigN)
Streamable
skip
in interface Streamable<T,S extends LongIndexedSpliterator<T,S>>
bigN
- the number of elements to be skipped (as a BigInteger).public long estimateSize()
estimateSize
in interface java.util.Spliterator<T>
public int characteristics()
characteristics
in interface java.util.Spliterator<T>
public boolean tryAdvance(java.util.function.Consumer<? super T> action)
tryAdvance
in interface java.util.Spliterator<T>
public java.util.Spliterator<T> trySplit()
trySplit
in interface java.util.Spliterator<T>
public void forEachRemaining(java.util.function.Consumer<? super T> action)
forEachRemaining
in interface java.util.Spliterator<T>
public S shuffle(java.util.Random rnd)
Streamable
shuffle
in interface Streamable<T,S extends LongIndexedSpliterator<T,S>>
rnd
- the random number generator to be used to perform the shuffling.