public class EnumRandomizer<E extends Enum<E>> extends AbstractRandomizer<E>
Randomizer
that generates a random value from a given Enum
.random
Constructor and Description |
---|
EnumRandomizer(Class<E> enumeration)
Create a new
EnumRandomizer . |
EnumRandomizer(Class<E> enumeration,
long seed)
Create a new
EnumRandomizer . |
Modifier and Type | Method and Description |
---|---|
static <E extends Enum<E>> |
aNewEnumRandomizer(Class<E> enumeration)
Create a new
EnumRandomizer . |
static <E extends Enum<E>> |
aNewEnumRandomizer(Class<E> enumeration,
long seed)
Create a new
EnumRandomizer . |
E |
getRandomValue()
Generate a random value for the given type.
|
getPredefinedValuesOf, toString
public EnumRandomizer(Class<E> enumeration)
EnumRandomizer
.enumeration
- the enumeration from which this randomizer will generate random valuespublic EnumRandomizer(Class<E> enumeration, long seed)
EnumRandomizer
.enumeration
- the enumeration from which this randomizer will generate random valuesseed
- the initial seedpublic static <E extends Enum<E>> EnumRandomizer<E> aNewEnumRandomizer(Class<E> enumeration)
EnumRandomizer
.enumeration
- the enumeration from which this randomizer will generate random valuesEnumRandomizer
.public static <E extends Enum<E>> EnumRandomizer<E> aNewEnumRandomizer(Class<E> enumeration, long seed)
EnumRandomizer
.enumeration
- the enumeration from which this randomizer will generate random valuesseed
- the initial seedEnumRandomizer
.public E getRandomValue()
Randomizer
Copyright © 2016. All Rights Reserved.