Package org.instancio.generator.time
Interface TemporalGeneratorSpec<T extends Temporal>
-
- All Superinterfaces:
GeneratorSpec<T>
- All Known Implementing Classes:
LocalDateGenerator
,LocalDateTimeGenerator
,LocalTimeGenerator
,YearGenerator
,YearMonthGenerator
,ZonedDateTimeGenerator
public interface TemporalGeneratorSpec<T extends Temporal> extends GeneratorSpec<T>
Generator spec forTemporal
types.
-
-
Field Summary
Fields Modifier and Type Field Description static Instant
DEFAULT_MAX
static Instant
DEFAULT_MIN
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TemporalGeneratorSpec<T>
future()
Generate a temporal value in the future.TemporalGeneratorSpec<T>
past()
Generate a temporal value in the past.TemporalGeneratorSpec<T>
range(T startInclusive, T endExclusive)
Generate a temporal value between the given range.
-
-
-
Method Detail
-
past
TemporalGeneratorSpec<T> past()
Generate a temporal value in the past.- Returns:
- spec builder
-
future
TemporalGeneratorSpec<T> future()
Generate a temporal value in the future.- Returns:
- spec builder
-
range
TemporalGeneratorSpec<T> range(T startInclusive, T endExclusive)
Generate a temporal value between the given range.- Parameters:
startInclusive
- start date (inclusive)endExclusive
- end date (exclusive)- Returns:
- spec builder
-
-