Package org.instancio.generator.specs
Interface ZonedDateTimeGeneratorAsSpec
- All Superinterfaces:
AsGeneratorSpec<ZonedDateTime>,GeneratorSpec<ZonedDateTime>,NullableGeneratorSpec<ZonedDateTime>,TemporalAsGeneratorSpec<ZonedDateTime>,TemporalGeneratorSpec<ZonedDateTime>,TruncatableTemporalSpec<ZonedDateTime>
public interface ZonedDateTimeGeneratorAsSpec
extends TemporalAsGeneratorSpec<ZonedDateTime>, TruncatableTemporalSpec<ZonedDateTime>
Generator spec for
ZonedDateTime.- Since:
- 4.2.0
-
Method Summary
Modifier and TypeMethodDescriptionfuture()Generate a value in the future.nullable()Indicates thatnullvalue can be generated.past()Generate a value in the past.range(ZonedDateTime start, ZonedDateTime end) Generate a value within the given range.truncatedTo(TemporalUnit unit) Truncates generated values to the specified unit.Methods inherited from interface org.instancio.generator.specs.AsGeneratorSpec
as, asString
-
Method Details
-
past
ZonedDateTimeGeneratorAsSpec past()Generate a value in the past.- Specified by:
pastin interfaceTemporalAsGeneratorSpec<ZonedDateTime>- Specified by:
pastin interfaceTemporalGeneratorSpec<ZonedDateTime>- Returns:
- spec builder
-
future
ZonedDateTimeGeneratorAsSpec future()Generate a value in the future.- Specified by:
futurein interfaceTemporalAsGeneratorSpec<ZonedDateTime>- Specified by:
futurein interfaceTemporalGeneratorSpec<ZonedDateTime>- Returns:
- spec builder
-
range
Generate a value within the given range.- Specified by:
rangein interfaceTemporalAsGeneratorSpec<ZonedDateTime>- Specified by:
rangein interfaceTemporalGeneratorSpec<ZonedDateTime>- Parameters:
start- lower bound (inclusive)end- upper bound (inclusive)- Returns:
- spec builder
-
truncatedTo
Truncates generated values to the specified unit.- Specified by:
truncatedToin interfaceTruncatableTemporalSpec<ZonedDateTime>- Parameters:
unit- to truncate to- Returns:
- spec builder
-
nullable
ZonedDateTimeGeneratorAsSpec nullable()Indicates thatnullvalue can be generated.- Specified by:
nullablein interfaceNullableGeneratorSpec<ZonedDateTime>- Specified by:
nullablein interfaceTemporalGeneratorSpec<ZonedDateTime>- Returns:
- spec builder
-