public interface StatefulRandomness extends RandomnessSource
Modifier and Type | Method and Description |
---|---|
RandomnessSource |
copy()
Produces a copy of this StatefulRandomness that, if next() and/or nextLong() are called on this object and the
copy, both will generate the same sequence of random numbers from the point copy() was called.
|
long |
getState()
Get the current internal state of the StatefulRandomness as a long.
|
void |
setState(long state)
Set the current internal state of this StatefulRandomness with a long.
|
next, nextLong
long getState()
void setState(long state)
state
- a 64-bit long. You should avoid passing 0, even though some implementations can handle that.RandomnessSource copy()
copy
in interface RandomnessSource
Copyright © Eben Howard 2012–2022. All rights reserved.