Package org.instancio.generator.specs
Interface TemporalGeneratorSpec<T>
- Type Parameters:
T- temporal type
- All Superinterfaces:
GeneratorSpec<T>,NullableGeneratorSpec<T>
- All Known Subinterfaces:
InstantSpec,LocalDateSpec,LocalDateTimeSpec,LocalTimeSpec,OffsetDateTimeSpec,OffsetTimeSpec,TemporalAaStringGeneratorSpec<T>,TemporalSpec<T>,YearMonthSpec,YearSpec,ZonedDateTimeSpec
- All Known Implementing Classes:
CalendarGenerator,DateGenerator,InstantGenerator,LocalDateGenerator,LocalDateTimeGenerator,LocalTimeGenerator,OffsetDateTimeGenerator,OffsetTimeGenerator,SqlDateGenerator,TimestampGenerator,YearGenerator,YearMonthGenerator,ZonedDateTimeGenerator
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
NullableGeneratorSpec<T> nullable()Indicates thatnullvalue can be generated.- Specified by:
nullablein interfaceNullableGeneratorSpec<T>- Returns:
- spec builder
- Since:
- 2.7.0
-