Package org.instancio.generator.specs
Interface NumericSequenceAsGeneratorSpec<T extends Number & Comparable<T>>
- Type Parameters:
T- the number type
- All Superinterfaces:
AsGeneratorSpec<T>,GeneratorSpec<T>,NullableGeneratorSpec<T>,NumericSequenceGeneratorSpec<T>
@ExperimentalApi
public interface NumericSequenceAsGeneratorSpec<T extends Number & Comparable<T>>
extends NumericSequenceGeneratorSpec<T>, AsGeneratorSpec<T>
A spec for generating numeric sequences
that supports
AsGeneratorSpec.- Since:
- 2.13.0
-
Method Summary
Modifier and TypeMethodDescriptionnext(UnaryOperator<T> next) Specifies the function for calculating the next sequence value.nullable()Indicates thatnullvalue can be generated.Specifies the starting value of the sequence.Methods inherited from interface org.instancio.generator.specs.AsGeneratorSpec
as, asString
-
Method Details
-
start
Description copied from interface:NumericSequenceGeneratorSpecSpecifies the starting value of the sequence. The default is1.- Specified by:
startin interfaceNumericSequenceGeneratorSpec<T extends Number & Comparable<T>>- Parameters:
start- the initial value of the sequence- Returns:
- spec builder
-
next
Description copied from interface:NumericSequenceGeneratorSpecSpecifies the function for calculating the next sequence value. If unspecified, the default is to increment the sequence by1.- Specified by:
nextin interfaceNumericSequenceGeneratorSpec<T extends Number & Comparable<T>>- Parameters:
next- a function for calculating the next value- Returns:
- spec builder
-
nullable
NumericSequenceAsGeneratorSpec<T> nullable()Description copied from interface:NumericSequenceGeneratorSpecIndicates thatnullvalue can be generated.- Specified by:
nullablein interfaceNullableGeneratorSpec<T extends Number & Comparable<T>>- Specified by:
nullablein interfaceNumericSequenceGeneratorSpec<T extends Number & Comparable<T>>- Returns:
- spec builder
-