|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.amino.utility.FastRandom
public final class FastRandom
This class provides fast random method. The quality of random number is not as good as standard library. And it's also not thread-safe, which means two threads might get the same random number if data race occurs.
Method Summary | |
---|---|
static int |
nextInt(int upper)
Generate a pseudo-random integer. |
static int |
rand()
Generate a pseudo-random integer. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static int rand()
public static int nextInt(int upper)
upper
- Upper bound of generated random number
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |