|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.obsearch.index.utils.OBRandom
public class OBRandom
A class used to generate random numbers. We use an implementation that seems to be better than the one provided by JDK. Every time you instantiate this class, a new seed will be generated!
Constructor Summary | |
---|---|
OBRandom()
When you create an OBRandom, a seed is generated by using a special seed generator. |
Method Summary | |
---|---|
boolean |
nextBoolean()
Returns the next boolean value from this random number generator's sequence. |
float |
nextFloat()
Returns a 32 bit uniformly distributed random number in the open unit interval (0.0f,1.0f) (excluding 0.0f and 1.0f) |
int |
nextInt(int n)
Returns a pseudorandom, uniformly distributed int value between 0 (inclusive) and the specified value (exclusive) |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OBRandom()
Method Detail |
---|
public float nextFloat()
public boolean nextBoolean()
public int nextInt(int n)
n
- the bound on the random number to be returned. Must be
positive.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |