Package org.instancio.generator.specs
Interface EnumAsGeneratorSpec<E extends Enum<E>>
- Type Parameters:
E- enum type
- All Superinterfaces:
AsGeneratorSpec<E>,EnumGeneratorSpec<E>,GeneratorSpec<E>,NullableGeneratorSpec<E>
public interface EnumAsGeneratorSpec<E extends Enum<E>>
extends AsGeneratorSpec<E>, EnumGeneratorSpec<E>
Spec for
Enums that supports AsGeneratorSpec.- Since:
- 2.12.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
Description copied from interface:EnumGeneratorSpecGenerate an enum while excluding the specified values. The argument can be an empty array, but notnull.- Specified by:
excludingin interfaceEnumGeneratorSpec<E extends Enum<E>>- Parameters:
values- to exclude- Returns:
- spec builder
-
nullable
EnumAsGeneratorSpec<E> nullable()Description copied from interface:EnumGeneratorSpecIndicates thatnullvalue can be generated.- Specified by:
nullablein interfaceEnumGeneratorSpec<E extends Enum<E>>- Specified by:
nullablein interfaceNullableGeneratorSpec<E extends Enum<E>>- Returns:
- spec builder
-