public interface Randomized
Randomized
interface defines the functionality of an object
whose computations are based in part on an underlying random number
generator (a Random
object). If an object implements this interface
it should not make use of Math.random()
.Modifier and Type | Method and Description |
---|---|
java.util.Random |
getRandom()
Gets the random number generator used by this object.
|
void |
setRandom(java.util.Random random)
Sets the random number generator used by this object.
|
java.util.Random getRandom()
void setRandom(java.util.Random random)
random
- The random number generator for this object to use.