public static final class Random.CompositeEngine extends java.lang.Object implements Random.Engine
Constructor and Description |
---|
Random.CompositeEngine(Random.Initializer initializer)
Constructs a CompositeEngine object that uses the specified initializer.
|
Modifier and Type | Method and Description |
---|---|
Data |
random(DataTypeId typeId,
int size)
Generated random data of the specified type and size.
|
void |
setGenerator(DataTypeId typeId,
Random.TypedGenerator generator)
Sets a generator responsible for generating data of the specified type.
|
void |
setSeed(int seed)
Sets a new seed of the random data generation engine.
|
void |
setUp()
Sets up the generation engine (if it requires some setup before being used).
|
public Random.CompositeEngine(Random.Initializer initializer)
initializer
- Initializer to be used to set up the randomizer.public void setGenerator(DataTypeId typeId, Random.TypedGenerator generator)
typeId
- Type identifier.generator
- Generator to the specified type.java.lang.NullPointerException
- if any of the parameters equals null.public void setUp()
setUp
in interface Random.Engine
public void setSeed(int seed)
setSeed
in interface Random.Engine
seed
- The seed to be set.public Data random(DataTypeId typeId, int size)
random
in interface Random.Engine
typeId
- Data type identifier.size
- Data type size (in bits).java.lang.NullPointerException
- if the typeId parameter equals null.java.lang.UnsupportedOperationException
- if random data generation is not supported by the given
data type.