|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.charlesames.utility.common.SharedRandomGenerator
public class SharedRandomGenerator
Singleton class which allows all the objects that use it to share the same random generator.
| Method Summary | |
|---|---|
java.util.Random |
getRandom()
|
static SharedRandomGenerator |
getSingleton()
|
void |
setSeed(long seed)
Sets the seed value for the shared random number generator. |
static void |
shuffle(java.util.List list)
Shuffle the indicated List of Object instances. |
static void |
shuffle(java.lang.Object[] array)
Shuffle the indicated array of Object instances. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static SharedRandomGenerator getSingleton()
public java.util.Random getRandom()
public void setSeed(long seed)
seed - public static void shuffle(java.lang.Object[] array)
Object instances.
This is a static helper method.
It employs the shared random number, which allows all random decisions employ the same seed.
array - The indicated array of Object instancespublic static void shuffle(java.util.List list)
List of Object instances.
This is a static helper method.
It employs the shared random number, which allows all random decisions employ the same seed.
list - The indicated list of Object instances
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||