public class DefaultRandomGeneratorService extends Object implements RandomGeneratorService
| Constructor and Description |
|---|
DefaultRandomGeneratorService() |
| Modifier and Type | Method and Description |
|---|---|
RandomGenerator |
getDefaultRandomGenerator()
Returns the default registered RandomGenerator;
|
String |
getName()
The name of the service.
|
RandomGenerator |
getRandomGeneratorByParameterizable(Parameterizable type)
This retrieves the most appropriate ParameterizableRandomGenerator for a given Type.
|
RandomGenerator |
getRandomGeneratorByType(Class<?> type)
This retrieves the most appropriate RandomGenerator for a given Type.
|
Collection<Class<?>> |
getRegisteredTypes()
Get all registered types.
|
void |
registerRandomGenerator(RandomGenerator randomGenerator)
Register a RandomGenerator.
|
void |
setDefaultRandomGenerator(RandomGenerator randomGenerator)
This method set the RandomGenerator to use if non are registered for given type.
|
public void registerRandomGenerator(RandomGenerator randomGenerator)
RandomGeneratorServiceregisterRandomGenerator in interface RandomGeneratorServicerandomGenerator - The random generator to register.public void setDefaultRandomGenerator(RandomGenerator randomGenerator)
RandomGeneratorServicesetDefaultRandomGenerator in interface RandomGeneratorServicerandomGenerator - The random generator to register.public RandomGenerator getDefaultRandomGenerator()
RandomGeneratorServicegetDefaultRandomGenerator in interface RandomGeneratorServicepublic RandomGenerator getRandomGeneratorByType(Class<?> type)
RandomGeneratorServicegetRandomGeneratorByType in interface RandomGeneratorServicetype - The type used to lookup the most appropriate RandomGenerator.public RandomGenerator getRandomGeneratorByParameterizable(Parameterizable type)
RandomGeneratorServicegetRandomGeneratorByParameterizable in interface RandomGeneratorServicetype - The parameterized type used to lookup the most appropriate RandomGenerator.public Collection<Class<?>> getRegisteredTypes()
RandomGeneratorServicegetRegisteredTypes in interface RandomGeneratorServiceCopyright © 2010–2019. All rights reserved.