public class JDKRandomGenerator extends Random implements RandomGenerator
java.util.Random
to implement
RandomGenerator
.Constructor and Description |
---|
JDKRandomGenerator()
Create a new JDKRandomGenerator with a default seed.
|
JDKRandomGenerator(int seed)
Create a new JDKRandomGenerator with the given seed.
|
Modifier and Type | Method and Description |
---|---|
void |
setSeed(int seed)
Sets the seed of the underlying random number generator using an
int seed. |
void |
setSeed(int[] seed)
Sets the seed of the underlying random number generator using an
int array seed. |
next, nextBoolean, nextBytes, nextDouble, nextFloat, nextGaussian, nextInt, nextInt, nextLong, setSeed
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
nextBoolean, nextBytes, nextDouble, nextFloat, nextGaussian, nextInt, nextInt, nextLong, setSeed
public JDKRandomGenerator()
public JDKRandomGenerator(int seed)
seed
- initial seedpublic void setSeed(int seed)
int
seed.
Sequences of values generated starting with the same seeds should be identical.
setSeed
in interface RandomGenerator
seed
- the seed valuepublic void setSeed(int[] seed)
int
array seed.
Sequences of values generated starting with the same seeds should be identical.
setSeed
in interface RandomGenerator
seed
- the seed valueCopyright © 2003–2016 The Apache Software Foundation. All rights reserved.