Package org.instancio.generator.lang
Interface NumberGeneratorSpec<T extends Number>
- Type Parameters:
T
- type of number
- All Superinterfaces:
GeneratorSpec<T>
- All Known Implementing Classes:
AbstractRandomComparableNumberGeneratorSpec
,AbstractRandomNumberGeneratorSpec
,AtomicIntegerGenerator
,AtomicLongGenerator
,BigDecimalGenerator
,BigIntegerGenerator
,ByteGenerator
,DoubleGenerator
,FloatGenerator
,IntegerGenerator
,LongGenerator
,ShortGenerator
Generator spec for core numeric types.
-
Method Summary
Modifier and TypeMethodDescriptionUpper bound for the random number generator.Lower bound for the random number generator.nullable()
Specifies the generated value can benull
.Range for the random number generator
-
Method Details
-
min
Lower bound for the random number generator.- Parameters:
min
- lower bound (inclusive)- Returns:
- spec builder
-
max
Upper bound for the random number generator.- Parameters:
max
- upper bound (exclusive)- Returns:
- spec builder
-
range
Range for the random number generator- Parameters:
min
- lower bound (inclusive)max
- upper bound (exclusive)- Returns:
- spec builder
-
nullable
NumberGeneratorSpec<T> nullable()Specifies the generated value can benull
.- Returns:
- spec builder
-