|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectrcf.system.random.RandomJavaAdapter
@Revision(value="$Revision: 1.3 $",
date="$Date: 2006/11/09 02:10:28 $",
tag="$Name: $")
public class RandomJavaAdapterTODO: Javadoc TODO: Unit tests, Code review, Javadoc review, Seal/Finalize TODO: equals, hashCode, toString
| Field Summary | |
|---|---|
protected Random |
random
TODO: Javadoc The java random number generator which is being adapted. |
| Constructor Summary | |
|---|---|
RandomJavaAdapter()
TODO: Javadoc |
|
RandomJavaAdapter(Random _random)
TODO: Javadoc |
|
| Method Summary | |
|---|---|
int |
randomBits(int bits)
TODO: Javadoc Generate a random bitstring of the requested length. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final Random random
| Constructor Detail |
|---|
public RandomJavaAdapter()
public RandomJavaAdapter(Random _random)
_random - | Method Detail |
|---|
public int randomBits(int bits)
Random
Note that this method can be thought of as equivalent to performing
bits independant, random coin tosses.
randomBits in interface Randombits - The number of random bits to generate. Given the size of the
int datatype in java, this parameter must be
32 or less. Note that asking for 0 random bits
will simply return the number 0.
0 and
whose lowest bits bits are randomly generated.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||