public class EnhancedRandomBuilder extends Object
EnhancedRandom
instances.Modifier and Type | Method and Description |
---|---|
static EnhancedRandomBuilder |
aNewEnhancedRandomBuilder()
Create a new
EnhancedRandomBuilder . |
EnhancedRandom |
build()
Build a
EnhancedRandom instance. |
<T,F> EnhancedRandomBuilder |
exclude(FieldDefinition<T,F> fieldDefinition)
Exclude a field from being populated.
|
<T,F,R> EnhancedRandomBuilder |
randomize(FieldDefinition<T,F> fieldDefinition,
Randomizer<R> randomizer)
Register a custom randomizer for a given field.
|
EnhancedRandomBuilder |
registerRandomizerRegistry(RandomizerRegistry registry)
Register a
RandomizerRegistry . |
EnhancedRandomBuilder |
scanClasspathForConcreteTypes(boolean scanClasspathForConcreteTypes)
Should the classpath be scanned for concrete types when a field with an interface or abstract
class type is encountered?
Deactivated by default.
|
EnhancedRandomBuilder |
seed(long seed)
Set the initial random seed.
|
public static EnhancedRandomBuilder aNewEnhancedRandomBuilder()
EnhancedRandomBuilder
.EnhancedRandomBuilder
public <T,F,R> EnhancedRandomBuilder randomize(FieldDefinition<T,F> fieldDefinition, Randomizer<R> randomizer)
fieldDefinition
- definition of the field to randomizerandomizer
- the custom Randomizer
to useEnhancedRandomBuilder
instancepublic <T,F> EnhancedRandomBuilder exclude(FieldDefinition<T,F> fieldDefinition)
fieldDefinition
- definition of the field to excludeEnhancedRandomBuilder
instancepublic EnhancedRandomBuilder seed(long seed)
seed
- the initial seedEnhancedRandomBuilder
instancepublic EnhancedRandomBuilder registerRandomizerRegistry(RandomizerRegistry registry)
RandomizerRegistry
.registry
- the RandomizerRegistry
to registerEnhancedRandomBuilder
instancepublic EnhancedRandomBuilder scanClasspathForConcreteTypes(boolean scanClasspathForConcreteTypes)
scanClasspathForConcreteTypes
- whether to scan the classpath or notEnhancedRandomBuilder
instancepublic EnhancedRandom build()
EnhancedRandom
instance.EnhancedRandom
instanceCopyright © 2016. All Rights Reserved.