Package org.instancio.generator.specs
Interface BooleanAsGeneratorSpec
- All Superinterfaces:
AsGeneratorSpec<Boolean>,BooleanGeneratorSpec,GeneratorSpec<Boolean>,NullableGeneratorSpec<Boolean>
Generator spec for
Boolean values
that supports AsGeneratorSpec.- Since:
- 2.6.0
-
Method Summary
Modifier and TypeMethodDescriptionnullable()Indicates thatnullvalue can be generated.probability(double probability) Specifies the probability of generatingtrue.Methods inherited from interface org.instancio.generator.specs.AsGeneratorSpec
as, asString
-
Method Details
-
probability
Specifies the probability of generatingtrue.- Specified by:
probabilityin interfaceBooleanGeneratorSpec- Parameters:
probability- of generatingtruebetween 0 and 1 inclusive- Returns:
- spec builder
- Since:
- 2.11.0
-
nullable
BooleanAsGeneratorSpec nullable()Description copied from interface:BooleanGeneratorSpecIndicates thatnullvalue can be generated.- Specified by:
nullablein interfaceBooleanGeneratorSpec- Specified by:
nullablein interfaceNullableGeneratorSpec<Boolean>- Returns:
- spec builder
-