public class RandomFactory extends Object
Constructor and Description |
---|
RandomFactory(Class randomClass) |
Modifier and Type | Method and Description |
---|---|
Random |
getNewRandomInstance()
This method returns new onject implementing Random interface, initialized with System.currentTimeMillis() as seed
|
Random |
getNewRandomInstance(long seed)
This method returns new onject implementing Random interface, initialized with seed value
|
Random |
getNewRandomInstance(long seed,
long size)
This method returns new onject implementing Random interface, initialized with seed value, with size of elements in buffer
|
Random |
getRandom()
This method returns Random implementation instance associated with calling thread
|
public RandomFactory(Class randomClass)
public Random getRandom()
public Random getNewRandomInstance()
public Random getNewRandomInstance(long seed)
seed
- seed for this rng objectpublic Random getNewRandomInstance(long seed, long size)
seed
- rng seedsize
- size of underlying bufferCopyright © 2017. All Rights Reserved.