|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.Random jtge.util.random.Random
An instance of this class is used to generate a stream of pseudorandom numbers. Its basically a wrapper for java.util.Random class with more high-level functionalities.
The behavior is stricly the same as java.util.Random, which is used internally.
Constructor Summary | |
Random()
Builds a default Random Object. |
|
Random(long seed)
|
Method Summary | |
long |
getSeed()
Returns the current seed used by this Random object. |
float |
nextFloat(float maxVal)
Returns a float in the range [0.0, maxVal[. |
void |
setSeed(long seed)
|
Methods inherited from class java.util.Random |
next, nextBoolean, nextBytes, nextDouble, nextFloat, nextGaussian, nextInt, nextInt, nextLong |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface jtge.util.random.IRandom |
nextInt |
Constructor Detail |
public Random()
Random.Random()
public Random(long seed)
seed
- the initial seedRandom.Random(long)
Method Detail |
public final void setSeed(long seed)
Random.setSeed(long)
public final long getSeed()
public final float nextFloat(float maxVal)
This method is implemented as :
return nextFloat() * maxVal;
nextFloat
in interface IRandom
maxVal
- the maximum value
Random.nextFloat()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |