java.util.Random. This interface is
implemented by AbstractRandomGenerator.
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: the next pseudorandom, uniformly distributedboolean value from this random number generator's
sequenceReturns the next pseudorandom, uniformly distributed
|
| public void | nextBytes(byte[]
the non-null byte array in which to put the
random bytes bytes)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 sequenceReturns 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 sequenceReturns 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 sequenceReturns the next pseudorandom, Gaussian ("normally") distributed
|
| public int | Returns: the next pseudorandom, uniformly distributedint
value from this random number generator's sequenceReturns 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)Returns a pseudorandom, uniformly distributed |
| public long | Returns: the next pseudorandom, uniformly distributedlong
value from this random number generator's sequenceReturns the next pseudorandom, uniformly distributed |
| public void | setSeed(int
the seed value seed)Sets the seed of the underlying random number generator using an
|
| public void | setSeed(int[]
the seed value seed)Sets the seed of the underlying random number generator using an
|
| public void | setSeed(long
the seed value seed)Sets the seed of the underlying random number generator using a
|
| nextBoolean | back to summary |
|---|---|
| public boolean nextBoolean() Returns the next pseudorandom, uniformly distributed
| |
| nextBytes | back to summary |
|---|---|
| public void nextBytes(byte[] bytes) 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() Returns the next pseudorandom, uniformly distributed
| |
| nextFloat | back to summary |
|---|---|
| public float nextFloat() Returns the next pseudorandom, uniformly distributed
| |
| nextGaussian | back to summary |
|---|---|
| public double nextGaussian() Returns the next pseudorandom, Gaussian ("normally") distributed
| |
| nextInt | back to summary |
|---|---|
| public int nextInt() Returns the next pseudorandom, uniformly distributed
| |
| nextInt | back to summary |
|---|---|
| public int nextInt(int n) Returns a pseudorandom, uniformly distributed
| |
| nextLong | back to summary |
|---|---|
| public long nextLong() Returns the next pseudorandom, uniformly distributed
| |
| setSeed | back to summary |
|---|---|
| public void setSeed(int seed) 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) 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) Sets the seed of the underlying random number generator using a
Sequences of values generated starting with the same seeds should be identical.
| |