public abstract class EnhancedRandom extends Random
| Constructor and Description |
|---|
EnhancedRandom() |
| Modifier and Type | Method and Description |
|---|---|
abstract <T> T |
nextObject(Class<T> type,
String... excludedFields)
Generate a random instance of the given type.
|
abstract <T> List<T> |
nextObjects(Class<T> type,
int size,
String... excludedFields)
Generate a fixed number of random instances of the given type.
|
public abstract <T> T nextObject(Class<T> type, String... excludedFields)
T - the actual type of the target objecttype - the type for which an instance will be generatedexcludedFields - the name of fields to excludeObjectGenerationException - when unable to populate an instance of the given typepublic abstract <T> List<T> nextObjects(Class<T> type, int size, String... excludedFields)
T - the actual type of the target objecttype - the type for which instances will be generatedexcludedFields - the name of fields to excludesize - the number of instances to generateObjectGenerationException - when unable to populate an instance of the given typeCopyright © 2016. All Rights Reserved.