Example usage for Java java.util Random fields, constructors, methods, implement or subclass
The text is from its open source code.
Random() Creates a new random number generator. | |
Random(long seed) Creates a new random number generator using a single long seed. |
DoubleStream | doubles(long streamSize) Returns a stream producing the given streamSize number of pseudorandom double values, each between zero (inclusive) and one (exclusive). |
DoubleStream | doubles(double randomNumberOrigin, double randomNumberBound) Returns an effectively unlimited stream of pseudorandom double values, each conforming to the given origin (inclusive) and bound (exclusive). |
DoubleStream | doubles() Returns an effectively unlimited stream of pseudorandom double values, each between zero (inclusive) and one (exclusive). |
Class> | getClass() Returns the runtime class of this Object . |
IntStream | ints(int randomNumberOrigin, int randomNumberBound) Returns an effectively unlimited stream of pseudorandom int values, each conforming to the given origin (inclusive) and bound (exclusive). |
IntStream | ints() Returns an effectively unlimited stream of pseudorandom int values. |
LongStream | longs(long randomNumberOrigin, long randomNumberBound) Returns an effectively unlimited stream of pseudorandom long values, each conforming to the given origin (inclusive) and bound (exclusive). |
boolean | nextBoolean() Returns the next pseudorandom, uniformly distributed boolean value from this random number generator's sequence. |
void | nextBytes(byte[] bytes) Generates random bytes and places them into a user-supplied byte array. |
double | nextDouble() Returns the next pseudorandom, uniformly distributed double value between 0.0 and 1.0 from this random number generator's sequence. |
float | nextFloat() Returns the next pseudorandom, uniformly distributed float value between 0.0 and 1.0 from this random number generator's sequence. |
double | nextGaussian() Returns the next pseudorandom, Gaussian ("normally") distributed double value with mean 0.0 and standard deviation 1.0 from this random number generator's sequence. |
int | nextInt(int bound) Returns a pseudorandom, uniformly distributed int value between 0 (inclusive) and the specified value (exclusive), drawn from this random number generator's sequence. |
int | nextInt() Returns the next pseudorandom, uniformly distributed int value from this random number generator's sequence. |
long | nextLong() Returns the next pseudorandom, uniformly distributed long value from this random number generator's sequence. |
void | setSeed(long seed) Sets the seed of this random number generator using a single long seed. |
String | toString() Returns a string representation of the object. |