Package ru.objectsfill.types.object_type
Class EnumFill
java.lang.Object
ru.objectsfill.types.object_type.EnumFill
- All Implemented Interfaces:
ObjectCollectionFillExtension,ObjectTypeFill
This class implements the ObjectTypeFill interface to provide object generation for enum types.
It generates random enum values based on the provided enum class.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfillStream(Class<?> collectionGenericType, Fill fill) Generates a stream of random enum values for the given collection generic type and fill parameters.Generates a random enum value for the given enum type and fill parameters.
-
Constructor Details
-
EnumFill
public EnumFill()
-
-
Method Details
-
generate
Generates a random enum value for the given enum type and fill parameters.- Specified by:
generatein interfaceObjectTypeFill- Parameters:
fieldType- the enum typefill- the fill parameters for object generation- Returns:
- a random enum value
-
fillStream
Generates a stream of random enum values for the given collection generic type and fill parameters.- Specified by:
fillStreamin interfaceObjectCollectionFillExtension- Parameters:
collectionGenericType- the generic type of the collection (enum type)fill- the fill parameters for object generation- Returns:
- a stream of random enum values
-