Package ru.ispras.fortress.data
Interface Random.Engine
-
- All Known Implementing Classes:
Random.CompositeEngine
- Enclosing class:
- Random
public static interface Random.Engine
TheRandom.Engine
interface is a common interface to be implemented by all generation engines. It provides methods for generating data and setting up the randomizer.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Data
random(DataTypeId typeId, int size)
Generated random data of the specified type and size.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).
-
-
-
Method Detail
-
setUp
void setUp()
Sets up the generation engine (if it requires some setup before being used).
-
setSeed
void setSeed(int seed)
Sets a new seed of the random data generation engine.- Parameters:
seed
- The seed to be set.
-
random
Data random(DataTypeId typeId, int size)
Generated random data of the specified type and size.- Parameters:
typeId
- Data type identifier.size
- Data type size (in bits).- Returns:
- A random data.
- Throws:
java.lang.UnsupportedOperationException
- if random data generation is not supported by the given data type.
-
-