|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmoka.lang.Object
moka.util.Random
An instance of this class is used to generate a stream of pseudorandom numbers.
Field Summary | |
short |
seed
The state associated with this pseudorandom number generator. |
Constructor Summary | |
Random()
Creates a new random number generator. |
|
Random(short seed)
Creates a new random number generator using a single short seed. |
Method Summary | |
boolean |
nextBoolean()
Generates the next pseudorandom boolean number. |
void |
nextBytes(moka.util.BYTE_p bytes,
short num)
Generates random bytes and places them into a user-supplied byte array. |
double |
nextDouble()
Generates the next pseudorandom double number. |
short |
nextShort()
Generates the next pseudorandom short number. |
Methods inherited from class moka.lang.Object |
equals, finalize, getClassName, toString |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public short seed
Constructor Detail |
public Random()
public Random(short seed)
short
seed.
seed
- the initial seed.Method Detail |
public short nextShort()
public double nextDouble()
public boolean nextBoolean()
public void nextBytes(moka.util.BYTE_p bytes, short num)
bytes
- the non-null byte array in which to put the
random bytes.num
- the number of random bytes to produce
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |