public abstract class EnhancedRandom
extends java.util.Random
EnhancedRandomBuilder.| Constructor and Description |
|---|
EnhancedRandom() |
| Modifier and Type | Method and Description |
|---|---|
abstract <T> T |
nextObject(java.lang.Class<T> type,
java.lang.String... excludedFields)
Generate a random instance of the given type.
|
abstract <T> java.util.stream.Stream<T> |
objects(java.lang.Class<T> type,
int amount,
java.lang.String... excludedFields)
Generate a stream of random instances of the given type.
|
static <T> T |
random(java.lang.Class<T> type,
java.lang.String... excludedFields)
Deprecated.
will be removed in v4. Use
nextObject(java.lang.Class, java.lang.String...) instead |
static <T> java.util.Collection<T> |
randomCollectionOf(int amount,
java.lang.Class<T> type,
java.lang.String... excludedFields)
Deprecated.
will be removed in v4. Use
objects(java.lang.Class, int, java.lang.String...) instead |
static <T> java.util.List<T> |
randomListOf(int amount,
java.lang.Class<T> type,
java.lang.String... excludedFields)
Deprecated.
will be removed in v4. Use
objects(java.lang.Class, int, java.lang.String...) instead |
static <T> java.util.Set<T> |
randomSetOf(int amount,
java.lang.Class<T> type,
java.lang.String... excludedFields)
Deprecated.
will be removed in v4. Use
objects(java.lang.Class, int, java.lang.String...) instead |
static <T> java.util.stream.Stream<T> |
randomStreamOf(int amount,
java.lang.Class<T> type,
java.lang.String... excludedFields)
Deprecated.
will be removed in v4. Use
objects(java.lang.Class, int, java.lang.String...) instead |
@Deprecated
public static <T> T random(java.lang.Class<T> type,
java.lang.String... excludedFields)
nextObject(java.lang.Class, java.lang.String...) insteadEnhancedRandomBuilder.T - the target typetype - the target class typeexcludedFields - the name of fields to exclude@Deprecated
public static <T> java.util.stream.Stream<T> randomStreamOf(int amount,
java.lang.Class<T> type,
java.lang.String... excludedFields)
objects(java.lang.Class, int, java.lang.String...) insteadEnhancedRandomBuilder.T - the actual type of the target objectsamount - the number of instances to generatetype - the type for which instances will be generatedexcludedFields - the name of fields to excludeObjectGenerationException - when unable to populate an instance of the given type@Deprecated
public static <T> java.util.List<T> randomListOf(int amount,
java.lang.Class<T> type,
java.lang.String... excludedFields)
objects(java.lang.Class, int, java.lang.String...) insteadList of random instances of the given type.
This method uses default parameters and does not take into account configuration parameters set with EnhancedRandomBuilder.T - the actual type of the target objectsamount - the number of instances to generatetype - the type for which instances will be generatedexcludedFields - the name of fields to excludeObjectGenerationException - when unable to populate an instance of the given type@Deprecated
public static <T> java.util.Set<T> randomSetOf(int amount,
java.lang.Class<T> type,
java.lang.String... excludedFields)
objects(java.lang.Class, int, java.lang.String...) insteadSet of random instances of the given type.
This method uses default parameters and does not take into account configuration parameters set with EnhancedRandomBuilder.T - the actual type of the target objectsamount - the number of instances to generatetype - the type for which instances will be generatedexcludedFields - the name of fields to excludeObjectGenerationException - when unable to populate an instance of the given type@Deprecated
public static <T> java.util.Collection<T> randomCollectionOf(int amount,
java.lang.Class<T> type,
java.lang.String... excludedFields)
objects(java.lang.Class, int, java.lang.String...) insteadCollection of random instances of the given type.
This method uses default parameters and does not take into account configuration parameters set with EnhancedRandomBuilder.T - the actual type of the target objectsamount - the number of instances to generatetype - the type for which instances will be generatedexcludedFields - the name of fields to excludeObjectGenerationException - when unable to populate an instance of the given typepublic abstract <T> T nextObject(java.lang.Class<T> type,
java.lang.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> java.util.stream.Stream<T> objects(java.lang.Class<T> type,
int amount,
java.lang.String... excludedFields)
T - the actual type of the target objectstype - the type for which instances will be generatedamount - the number of instances to generateexcludedFields - the name of fields to excludeObjectGenerationException - when unable to populate an instance of the given typeCopyright © 2019. All Rights Reserved.