| java.lang.Object java.util.Random org.apache.commons.lang.math.JVMRandom
JVMRandom | final public class JVMRandom extends Random (Code) | | JVMRandom is a wrapper that supports all possible
Random methods via the
java.lang.Math.random method
and its system-wide
Random object.
since: 2.0 version: $Id: JVMRandom.java 471626 2006-11-06 04:02:09Z bayard $ |
Constructor Summary | |
public | JVMRandom() Constructs a new instance. |
JVMRandom | public JVMRandom()(Code) | | Constructs a new instance.
|
nextBoolean | public boolean nextBoolean()(Code) | | Returns the next pseudorandom, uniformly distributed boolean value
from the Math.random() sequence.
the random boolean |
nextDouble | public double nextDouble()(Code) | | Synonymous to the Math.random() call.
the random double |
nextFloat | public 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 |
nextGaussian | public synchronized double nextGaussian()(Code) | | Unsupported in 2.0.
Nothing, this method always throws an UnsupportedOperationException. throws: UnsupportedOperationException - |
nextInt | public int nextInt()(Code) | | Returns the next pseudorandom, uniformly distributed int value
from the Math.random() sequence.
the random int |
nextInt | public 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 throws: IllegalArgumentException - when n <= 0 |
nextLong | public long nextLong()(Code) | | Returns the next pseudorandom, uniformly distributed long value
from the Math.random() sequence.
the random long |
nextLong | public static long nextLong(long n)(Code) | | Returns a pseudorandom, uniformly distributed long value between
0 (inclusive) and the specified value (exclusive), from
the Math.random() sequence.
Parameters: n - the specified exclusive max-value the random long throws: IllegalArgumentException - when n <= 0 |
|
|