Package org.instancio.generator.specs
Interface BooleanGeneratorSpec
- All Superinterfaces:
AsGeneratorSpec<Boolean>,GeneratorSpec<Boolean>,NullableGeneratorSpec<Boolean>
- All Known Subinterfaces:
BooleanSpec
public interface BooleanGeneratorSpec
extends AsGeneratorSpec<Boolean>, NullableGeneratorSpec<Boolean>
Generator spec for booleans.
- Since:
- 2.0.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.- Parameters:
probability- of generatingtruebetween 0 and 1 inclusive- Returns:
- spec builder
- Since:
- 2.11.0
-
nullable
BooleanGeneratorSpec nullable()Indicates thatnullvalue can be generated.- Specified by:
nullablein interfaceNullableGeneratorSpec<Boolean>- Returns:
- spec builder
- Since:
- 2.0.0
-