| java.lang.Object org.apache.commons.lang.math.RandomUtils
RandomUtils | public class RandomUtils (Code) | | RandomUtils is a wrapper that supports all possible
java.util.Random methods via the
java.lang.Math.random method and its system-wide Random object.
author: Gary D. Gregory since: 2.0 version: $Id: RandomUtils.java 471626 2006-11-06 04:02:09Z bayard $
|
Method Summary | |
public static boolean | nextBoolean() | public static boolean | nextBoolean(Random random) Returns the next pseudorandom, uniformly distributed boolean value
from the given random sequence.
Parameters: random - the Random sequence generator. | public static double | nextDouble() | public static double | nextDouble(Random random) Returns the next pseudorandom, uniformly distributed float value
between 0.0 and 1.0 from the given Random
sequence.
Parameters: random - the Random sequence generator. | public static float | nextFloat() | public static float | nextFloat(Random random) Returns the next pseudorandom, uniformly distributed float value
between 0.0 and 1.0 from the given Random
sequence.
Parameters: random - the Random sequence generator. | public static int | nextInt() | public static int | nextInt(Random random) Returns the next pseudorandom, uniformly distributed int value
from the given random sequence.
Parameters: random - the Random sequence generator. | public static int | nextInt(int n) | public static int | nextInt(Random random, int n) | public static long | nextLong() | public static long | nextLong(Random random) Returns the next pseudorandom, uniformly distributed long value
from the given Random sequence.
Parameters: random - the Random sequence generator. |
nextBoolean | public static boolean nextBoolean()(Code) | | Returns the next pseudorandom, uniformly distributed boolean value
from the Math.random() sequence.
the random boolean |
nextBoolean | public static boolean nextBoolean(Random random)(Code) | | Returns the next pseudorandom, uniformly distributed boolean value
from the given random sequence.
Parameters: random - the Random sequence generator. the random boolean |
nextDouble | public static double nextDouble()(Code) | | Returns the next pseudorandom, uniformly distributed float value
between 0.0 and 1.0 from the Math.random()
sequence.
the random double |
nextDouble | public static double nextDouble(Random random)(Code) | | Returns the next pseudorandom, uniformly distributed float value
between 0.0 and 1.0 from the given Random
sequence.
Parameters: random - the Random sequence generator. the random double |
nextFloat | public static float nextFloat()(Code) | | Returns the next pseudorandom, uniformly distributed float value
between 0.0 and 1.0 from the Math.random()
sequence.
the random float |
nextFloat | public static float nextFloat(Random random)(Code) | | Returns the next pseudorandom, uniformly distributed float value
between 0.0 and 1.0 from the given Random
sequence.
Parameters: random - the Random sequence generator. the random float |
nextInt | public static int nextInt()(Code) | | Returns the next pseudorandom, uniformly distributed int value
from the Math.random() sequence.
the random int |
nextInt | public static int nextInt(Random random)(Code) | | Returns the next pseudorandom, uniformly distributed int value
from the given random sequence.
Parameters: random - the Random sequence generator. the random int |
nextInt | public static int nextInt(int n)(Code) | | Returns a pseudorandom, uniformly distributed int value
between 0 (inclusive) and the specified value
(exclusive), from the Math.random() sequence.
Parameters: n - the specified exclusive max-value the random int |
nextInt | public static int nextInt(Random random, int n)(Code) | | Returns a pseudorandom, uniformly distributed int value
between 0 (inclusive) and the specified value
(exclusive), from the given Random sequence.
Parameters: random - the Random sequence generator. Parameters: n - the specified exclusive max-value the random int |
nextLong | public static long nextLong()(Code) | | Returns the next pseudorandom, uniformly distributed long value
from the Math.random() sequence.
the random long |
nextLong | public static long nextLong(Random random)(Code) | | Returns the next pseudorandom, uniformly distributed long value
from the given Random sequence.
Parameters: random - the Random sequence generator. the random long |
|
|