Package org.instancio.generator.specs
Interface TemporalGeneratorSpec<T>
- Type Parameters:
T- temporal type
- All Superinterfaces:
GeneratorSpec<T>,NullableGeneratorSpec<T>
- All Known Subinterfaces:
InstantGeneratorAsSpec,InstantSpec,LocalDateSpec,LocalDateTimeGeneratorAsSpec,LocalDateTimeSpec,LocalTimeGeneratorAsSpec,LocalTimeSpec,OffsetDateTimeGeneratorAsSpec,OffsetDateTimeSpec,OffsetTimeGeneratorAsSpec,OffsetTimeSpec,TemporalAsGeneratorSpec<T>,TemporalSpec<T>,YearMonthSpec,YearSpec,ZonedDateTimeGeneratorAsSpec,ZonedDateTimeSpec
Generator spec for
Temporal types.- Since:
- 1.1.2
-
Method Details
-
past
TemporalGeneratorSpec<T> past()Generate a value in the past.- Returns:
- spec builder
-
future
TemporalGeneratorSpec<T> future()Generate a value in the future.- Returns:
- spec builder
-
range
Generate a value within the given range.- Parameters:
start- lower bound (inclusive)end- upper bound (inclusive)- Returns:
- spec builder
-
nullable
TemporalGeneratorSpec<T> nullable()Indicates thatnullvalue can be generated.- Specified by:
nullablein interfaceNullableGeneratorSpec<T>- Returns:
- spec builder
- Since:
- 2.7.0
-