Package org.instancio.generator.specs
Interface TemporalSpec<T>
- Type Parameters:
T- temporal type
- All Superinterfaces:
AsGeneratorSpec<T>,GeneratorSpec<T>,NullableGeneratorSpec<T>,Supplier<T>,TemporalGeneratorSpec<T>,ValueSpec<T>
- All Known Subinterfaces:
InstantSpec,LocalDateSpec,LocalDateTimeSpec,LocalTimeSpec,OffsetDateTimeSpec,OffsetTimeSpec,YearMonthSpec,YearSpec,ZonedDateTimeSpec
Spec for generating
Temporal types.- Since:
- 2.6.0
-
Method Summary
Methods inherited from interface org.instancio.generator.specs.AsGeneratorSpec
as, asString
-
Method Details
-
past
Generate a value in the past.- Specified by:
pastin interfaceTemporalGeneratorSpec<T>- Returns:
- spec builder
-
future
Generate a value in the future.- Specified by:
futurein interfaceTemporalGeneratorSpec<T>- Returns:
- spec builder
-
min
Specifies the lower bound.- Specified by:
minin interfaceTemporalGeneratorSpec<T>- Parameters:
min- lower bound (inclusive)- Returns:
- spec builder
- Since:
- 4.6.0
- See Also:
-
max
Specifies the upper bound.- Specified by:
maxin interfaceTemporalGeneratorSpec<T>- Parameters:
max- upper bound (inclusive)- Returns:
- spec builder
- Since:
- 4.6.0
- See Also:
-
range
Generate a value within the given range.- Specified by:
rangein interfaceTemporalGeneratorSpec<T>- Parameters:
min- lower bound (inclusive)max- upper bound (inclusive)- Returns:
- spec builder
- See Also:
-
nullable
TemporalSpec<T> nullable()Specifies that anullvalue can be generated- Specified by:
nullablein interfaceNullableGeneratorSpec<T>- Specified by:
nullablein interfaceTemporalGeneratorSpec<T>- Specified by:
nullablein interfaceValueSpec<T>- Returns:
- spec builder reference
- Since:
- 2.7.0
-