public interface RandomnessSource
extends java.io.Serializable
Modifier and Type | Method and Description |
---|---|
RandomnessSource |
copy()
Produces a copy of this RandomnessSource 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.
|
int |
next(int bits)
Using this method, any algorithm that might use the built-in Java Random
can interface with this randomness source.
|
long |
nextLong()
Using this method, any algorithm that needs to efficiently generate more
than 32 bits of random data can interface with this randomness source.
|
int next(int bits)
bits
- the number of bits to be returnedlong nextLong()
RandomnessSource copy()
Copyright © Eben Howard 2012–2022. All rights reserved.