|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.Random
com.limegroup.gnutella.util.Random12
A subclass of Random that provides the convenient nextInt(n) method from Java 1.2 and later. Useful for compatibility with Java 1.1.8 on the Macintosh. Subclassing is necessary to gain access to the protected next(int) method.
Constructor Summary | |
Random12()
|
|
Random12(long seed)
|
Method Summary | |
int |
nextInt(int n)
Returns a random number from 0 (inclusive) to n (exclusive). |
Methods inherited from class java.util.Random |
next, nextBoolean, nextBytes, nextDouble, nextFloat, nextGaussian, nextInt, nextLong, setSeed |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Random12()
public Random12(long seed)
Method Detail |
public int nextInt(int n) throws java.lang.IllegalArgumentException
n
- the largest value allowed plus one
java.lang.IllegalArgumentException
- n is less than one
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |