SplittableRandom (Java SE 12 & JDK 12 )
DoubleStream
doubles()
Returns an effectively unlimited stream of pseudorandom
double values from this generator and/or one split from it; each value
is between zero (inclusive) and one (exclusive).
DoubleStream
doubles(double randomNumberOrigin,
double randomNumberBound)
Returns an effectively unlimited stream of pseudorandom
double values from this generator and/or one split from it; each value
conforms to the given origin (inclusive) and bound (exclusive).
DoubleStream
doubles(long streamSize)
Returns a stream producing the given streamSize number of
pseudorandom double values from this generator and/or one split
from it; each value is between zero (inclusive) and one (exclusive).
DoubleStream
doubles(long streamSize,
double randomNumberOrigin,
double randomNumberBound)
Returns a stream producing the given streamSize number of
pseudorandom double values from this generator and/or one split
from it; each value conforms to the given origin (inclusive) and bound
(exclusive).
IntStream
ints()
Returns an effectively unlimited stream of pseudorandom int
values from this generator and/or one split from it.
IntStream
ints(int randomNumberOrigin,
int randomNumberBound)
Returns an effectively unlimited stream of pseudorandom
int values from this generator and/or one split from it; each value
conforms to the given origin (inclusive) and bound (exclusive).
IntStream
ints(long streamSize)
Returns a stream producing the given streamSize number
of pseudorandom int values from this generator and/or
one split from it.
IntStream
ints(long streamSize,
int randomNumberOrigin,
int randomNumberBound)
Returns a stream producing the given streamSize number
of pseudorandom int values from this generator and/or one split
from it; each value conforms to the given origin (inclusive) and bound
(exclusive).
LongStream
longs()
Returns an effectively unlimited stream of pseudorandom
long values from this generator and/or one split from it.
LongStream
longs(long streamSize)
Returns a stream producing the given streamSize number
of pseudorandom long values from this generator and/or
one split from it.
LongStream
longs(long randomNumberOrigin,
long randomNumberBound)
Returns an effectively unlimited stream of pseudorandom
long values from this generator and/or one split from it; each value
conforms to the given origin (inclusive) and bound (exclusive).
LongStream
longs(long streamSize,
long randomNumberOrigin,
long randomNumberBound)
Returns a stream producing the given streamSize number of
pseudorandom long values from this generator and/or one split
from it; each value conforms to the given origin (inclusive) and bound
(exclusive).
boolean
nextBoolean()
Returns a pseudorandom boolean value.
void
nextBytes(byte[] bytes)
Fills a user-supplied byte array with generated pseudorandom bytes.
double
nextDouble()
Returns a pseudorandom double value between zero
(inclusive) and one (exclusive).
double
nextDouble(double bound)
Returns a pseudorandom double value between 0.0
(inclusive) and the specified bound (exclusive).
double
nextDouble(double origin,
double bound)
Returns a pseudorandom double value between the specified
origin (inclusive) and bound (exclusive).
int
nextInt()
Returns a pseudorandom int value.
int
nextInt(int bound)
Returns a pseudorandom int value between zero (inclusive)
and the specified bound (exclusive).
int
nextInt(int origin,
int bound)
Returns a pseudorandom int value between the specified
origin (inclusive) and the specified bound (exclusive).
long
nextLong()
Returns a pseudorandom long value.
long
nextLong(long bound)
Returns a pseudorandom long value between zero (inclusive)
and the specified bound (exclusive).
long
nextLong(long origin,
long bound)
Returns a pseudorandom long value between the specified
origin (inclusive) and the specified bound (exclusive).
SplittableRandom
split()
Constructs and returns a new SplittableRandom instance that shares no mutable state with this instance.