public interface Streamable<T,S extends Streamable<T,S>>
Stream
s.Modifier and Type | Method and Description |
---|---|
java.math.BigInteger |
bigCount() |
long |
count() |
default S |
ordered()
Convenience method for adding the
Spliterator.ORDERED characteristic to the provided streams. |
java.util.stream.Stream<T> |
parallelStream() |
default <Z extends Streamable<T,?>> |
shuffle()
Configure this instance to provide streams that shuffle elements in the data source.
|
<Z extends Streamable<T,?>> |
shuffle(java.util.Random random)
Configure this instance to provide streams that shuffle elements in the data source.
|
<Z extends Streamable<T,?>> |
skip(java.math.BigInteger n)
Configure this instance to provide streams that skip the first {}@code n} elements in the data source.
|
<Z extends Streamable<T,?>> |
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() |
S |
withAdditionalCharacteristics(int additionalCharacteristics)
Adds
additionalCharacteristics to the provided streams. |
java.util.stream.Stream<T> stream()
Stream
java.util.stream.Stream<T> parallelStream()
Stream
long count()
java.math.BigInteger bigCount()
S withAdditionalCharacteristics(int additionalCharacteristics)
additionalCharacteristics
to the provided streams.default S ordered()
Spliterator.ORDERED
characteristic to the provided streams.<Z extends Streamable<T,?>> Z skip(long n)
Stream.skip(long)
.n
- the number of elements to be skipped (as a long).<Z extends Streamable<T,?>> Z skip(java.math.BigInteger n)
n
- the number of elements to be skipped (as a BigInteger).<Z extends Streamable<T,?>> Z shuffle(java.util.Random random)
random
- the random number generator to be used to perform the shuffling.default <Z extends Streamable<T,?>> Z shuffle()
shuffle(Random)
with a random number generator created using the parameterless constructor of Random
.