Package org.instancio.generator.specs
Interface EnumGeneratorSpec<E extends Enum<E>>
- Type Parameters:
E- enum type
- All Superinterfaces:
AsGeneratorSpec<E>,GeneratorSpec<E>,NullableGeneratorSpec<E>
- All Known Subinterfaces:
EnumSpec<E>
public interface EnumGeneratorSpec<E extends Enum<E>>
extends AsGeneratorSpec<E>, NullableGeneratorSpec<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.Methods inherited from interface org.instancio.generator.specs.AsGeneratorSpec
as, asString
-
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
-