Package ru.objectsfill.core
Class RandomValue
java.lang.Object
ru.objectsfill.core.RandomValue
The RandomValue class is designed to populate POJO classes with random data.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> TFills the given object with random values shorter.static <T> TFills the given object with random values shorter.static <T> TFills the given object with random values.static <T> T[]Creates and fills an array with random values.static <T extends Collection<K>,K>
voidfillCollection(T collection, Fill fill) Fills the given collection with random values.static <K> KfillSingleVal(Fill fill) Generates a single random value.static <K> Stream<K>fillStream(Fill fill) Fills the given collection with random values.
-
Method Details
-
fill
Fills the given object with random values.- Type Parameters:
T- The type of the target object.- Parameters:
fill- The object containing all the information about the target object.- Returns:
- The filled object.
-
fill
Fills the given object with random values shorter.- Type Parameters:
T- The type of the target object.- Parameters:
object- The object to create fill.- Returns:
- The filled object.
-
fill
Fills the given object with random values shorter.- Type Parameters:
T- The type of the target object.- Parameters:
clazz- The class to create fill.- Returns:
- The filled object.
-
fillCollection
Fills the given collection with random values.- Type Parameters:
T- The type of the collection.K- The type of the elements in the collection.- Parameters:
collection- The collection type for populating.fill- The object containing all the information about the target collection.
-
fillStream
Fills the given collection with random values.- Type Parameters:
K- The type of stream- Parameters:
fill- The object containing all the information about the target collection.- Returns:
- not closed stream
-
fillArray
Creates and fills an array with random values.- Type Parameters:
T- The type of the elements in the array.- Parameters:
fill- The object containing all the information about the target array.- Returns:
- The filled array.
-
fillSingleVal
Generates a single random value.- Type Parameters:
K- The type of the value.- Parameters:
fill- The object containing all the information about the target value.- Returns:
- The generated value.
-