Package org.instancio.generator.specs
Interface TemporalAsGeneratorSpec<T>
- All Superinterfaces:
AsGeneratorSpec<T>,GeneratorSpec<T>,NullableGeneratorSpec<T>,TemporalGeneratorSpec<T>
- All Known Subinterfaces:
InstantGeneratorAsSpec,LocalDateTimeGeneratorAsSpec,LocalTimeGeneratorAsSpec,OffsetDateTimeGeneratorAsSpec,OffsetTimeGeneratorAsSpec,ZonedDateTimeGeneratorAsSpec
Generator spec for temporal values that supports
AsGeneratorSpec.- Since:
- 2.6.0
-
Method Summary
Methods inherited from interface org.instancio.generator.specs.AsGeneratorSpec
as, asStringMethods inherited from interface org.instancio.generator.specs.TemporalGeneratorSpec
nullable
-
Method Details
-
past
TemporalAsGeneratorSpec<T> past()Generate a value in the past.- Specified by:
pastin interfaceTemporalGeneratorSpec<T>- Returns:
- spec builder
-
future
TemporalAsGeneratorSpec<T> future()Generate a value in the future.- Specified by:
futurein interfaceTemporalGeneratorSpec<T>- Returns:
- spec builder
-
range
Generate a value within the given range.- Specified by:
rangein interfaceTemporalGeneratorSpec<T>- Parameters:
start- lower bound (inclusive)end- upper bound (inclusive)- Returns:
- spec builder
-