java.util.Random wrapping a
RandomGenerator.
| Modifier and Type | Field and Description |
|---|---|
| private final RandomGenerator | randomGenerator
Wrapped randomGenerator instance |
| private static final long | serialVersionUID
Serializable version identifier.
|
| Access | Constructor and Description |
|---|---|
| private | |
| public | RandomAdaptor(RandomGenerator
the wrapped generator randomGenerator)Construct a RandomAdaptor wrapping the supplied RandomGenerator. |
| Modifier and Type | Method and Description |
|---|---|
| public static Random | Returns: a Random instance wrapping the RandomGeneratorwrapped RandomGenerator instance randomGenerator)Factory method to create a |
| public boolean | Returns: the next pseudorandom, uniformly distributedboolean value from this random number generator's
sequenceOverrides java. Overrides default java. Implements org. Returns the next pseudorandom, uniformly distributed
|
| public void | nextBytes(byte[]
the non-null byte array in which to put the
random bytes bytes)Overrides java. Overrides default java. Implements org. Generates random bytes and places them into a user-supplied byte array. |
| public double | Returns: the next pseudorandom, uniformly distributeddouble value between 0.0 and
1.0 from this random number generator's sequenceOverrides java. Overrides default java. Implements org. Returns the next pseudorandom, uniformly distributed
|
| public float | Returns: the next pseudorandom, uniformly distributedfloat
value between 0.0 and 1.0 from this
random number generator's sequenceOverrides java. Overrides default java. Implements org. Returns the next pseudorandom, uniformly distributed |
| public double | Returns: the next pseudorandom, Gaussian ("normally") distributeddouble value with mean 0.0 and
standard deviation 1.0 from this random number
generator's sequenceOverrides java. Overrides default java. Implements org. Returns the next pseudorandom, Gaussian ("normally") distributed
|
| public int | Returns: the next pseudorandom, uniformly distributedint
value from this random number generator's sequenceOverrides java. Overrides default java. Implements org. Returns the next pseudorandom, uniformly distributed |
| public int | Returns: a pseudorandom, uniformly distributedint
value between 0 (inclusive) and n (exclusive).the bound on the random number to be returned. Must be
positive. n)Overrides java. Overrides default java. Implements org. Returns a pseudorandom, uniformly distributed |
| public long | Returns: the next pseudorandom, uniformly distributedlong
value from this random number generator's sequenceOverrides java. Implements org. Returns the next pseudorandom, uniformly distributed |
| public void | setSeed(int
the seed value seed)Implements org. Sets the seed of the underlying random number generator using an
|
| public void | setSeed(int[]
the seed value seed)Implements org. Sets the seed of the underlying random number generator using an
|
| public void | setSeed(long
the seed value seed)Overrides java. Implements org. Sets the seed of the underlying random number generator using a
|
| randomGenerator | back to summary |
|---|---|
| private final RandomGenerator randomGenerator Wrapped randomGenerator instance | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides java. Serializable version identifier. | |
| RandomAdaptor | back to summary |
|---|---|
| private RandomAdaptor() Prevent instantiation without a generator argument
| |
| RandomAdaptor | back to summary |
|---|---|
| public RandomAdaptor(RandomGenerator randomGenerator) Construct a RandomAdaptor wrapping the supplied RandomGenerator.
| |
| createAdaptor | back to summary |
|---|---|
| public static Random createAdaptor(RandomGenerator randomGenerator) Factory method to create a
| |
| nextBoolean | back to summary |
|---|---|
| public boolean nextBoolean() Overrides java. Overrides default java. Implements org. Returns the next pseudorandom, uniformly distributed
| |
| nextBytes | back to summary |
|---|---|
| public void nextBytes(byte[] bytes) Overrides java. Overrides default java. Implements org. Generates random bytes and places them into a user-supplied byte array. The number of random bytes produced is equal to the length of the byte array.
| |
| nextDouble | back to summary |
|---|---|
| public double nextDouble() Overrides java. Overrides default java. Implements org. Returns the next pseudorandom, uniformly distributed
| |
| nextFloat | back to summary |
|---|---|
| public float nextFloat() Overrides java. Overrides default java. Implements org. Returns the next pseudorandom, uniformly distributed
| |
| nextGaussian | back to summary |
|---|---|
| public double nextGaussian() Overrides java. Overrides default java. Implements org. Returns the next pseudorandom, Gaussian ("normally") distributed
| |
| nextInt | back to summary |
|---|---|
| public int nextInt() Overrides java. Overrides default java. Implements org. Returns the next pseudorandom, uniformly distributed
| |
| nextInt | back to summary |
|---|---|
| public int nextInt(int n) Overrides java. Overrides default java. Implements org. Returns a pseudorandom, uniformly distributed
| |
| nextLong | back to summary |
|---|---|
| public long nextLong() Overrides java. Implements org. Returns the next pseudorandom, uniformly distributed
| |
| setSeed | back to summary |
|---|---|
| public void setSeed(int seed) Implements org. Doc from org. Sets the seed of the underlying random number generator using an
Sequences of values generated starting with the same seeds should be identical.
| |
| setSeed | back to summary |
|---|---|
| public void setSeed(int[] seed) Implements org. Doc from org. Sets the seed of the underlying random number generator using an
Sequences of values generated starting with the same seeds should be identical.
| |
| setSeed | back to summary |
|---|---|
| public void setSeed(long seed) Overrides java. Implements org. Doc from org. Sets the seed of the underlying random number generator using a
Sequences of values generated starting with the same seeds should be identical.
| |