Package org.instancio.generator.specs
Interface TemporalGeneratorSpec<T>
- Type Parameters:
T- temporal type
- All Superinterfaces:
AsGeneratorSpec<T>,GeneratorSpec<T>,NullableGeneratorSpec<T>
- All Known Subinterfaces:
InstantGeneratorSpec,InstantSpec,LocalDateSpec,LocalDateTimeGeneratorSpec,LocalDateTimeSpec,LocalTimeGeneratorSpec,LocalTimeSpec,OffsetDateTimeGeneratorSpec,OffsetDateTimeSpec,OffsetTimeGeneratorSpec,OffsetTimeSpec,TemporalSpec<T>,YearMonthSpec,YearSpec,ZonedDateTimeGeneratorSpec,ZonedDateTimeSpec
Generator spec for
Temporal types.- Since:
- 1.1.2
-
Method Summary
Methods inherited from interface org.instancio.generator.specs.AsGeneratorSpec
as, asString
-
Method Details
-
past
Generate a value in the past.- Returns:
- spec builder
-
future
Generate a value in the future.- Returns:
- spec builder
-
min
Specifies the lower bound.- Parameters:
min- lower bound (inclusive)- Returns:
- spec builder
- Since:
- 4.6.0
- See Also:
-
max
Specifies the upper bound.- Parameters:
max- upper bound (inclusive)- Returns:
- spec builder
- Since:
- 4.6.0
- See Also:
-
range
Generate a value within the given range.- Parameters:
min- lower bound (inclusive)max- upper bound (inclusive)- Returns:
- spec builder
- See Also:
-
nullable
TemporalGeneratorSpec<T> nullable()Indicates thatnullvalue can be generated.- Specified by:
nullablein interfaceNullableGeneratorSpec<T>- Returns:
- spec builder
- Since:
- 2.7.0
-