Package org.instancio.generator.specs
Interface EnumGeneratorSpec<E extends Enum<E>>
- Type Parameters:
E- enum type
- All Superinterfaces:
GeneratorSpec<E>,NullableGeneratorSpec<E>
- All Known Subinterfaces:
EnumAsGeneratorSpec<E>,EnumSpec<E>
Generator spec for
Enums.- Since:
- 1.6.0
-
Method Summary
Modifier and TypeMethodDescriptionGenerate an enum while excluding the specified values.nullable()Indicates thatnullvalue can be generated.
-
Method Details
-
excluding
Generate an enum while excluding the specified values. The argument can be an empty array, but notnull.- Parameters:
values- to exclude- Returns:
- spec builder
- Since:
- 1.6.0
-
nullable
EnumGeneratorSpec<E> nullable()Indicates thatnullvalue can be generated.- Specified by:
nullablein interfaceNullableGeneratorSpec<E extends Enum<E>>- Returns:
- spec builder
- Since:
- 1.6.0
-