Package org.instancio.generator.specs
Interface OffsetDateTimeGeneratorSpec
- All Superinterfaces:
AsGeneratorSpec<OffsetDateTime>,GeneratorSpec<OffsetDateTime>,NullableGeneratorSpec<OffsetDateTime>,TemporalGeneratorSpec<OffsetDateTime>,TruncatableTemporalGeneratorSpec<OffsetDateTime>
- All Known Subinterfaces:
OffsetDateTimeSpec
public interface OffsetDateTimeGeneratorSpec
extends TemporalGeneratorSpec<OffsetDateTime>, TruncatableTemporalGeneratorSpec<OffsetDateTime>
Generator spec for
OffsetDateTime.- Since:
- 4.2.0
-
Method Summary
Modifier and TypeMethodDescriptionfuture()Generate a value in the future.max(OffsetDateTime max) Specifies the upper bound.min(OffsetDateTime min) Specifies the lower bound.nullable()Indicates thatnullvalue can be generated.past()Generate a value in the past.range(OffsetDateTime min, OffsetDateTime max) 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
Generate a value in the past.- Specified by:
pastin interfaceTemporalGeneratorSpec<OffsetDateTime>- Returns:
- spec builder
-
future
Generate a value in the future.- Specified by:
futurein interfaceTemporalGeneratorSpec<OffsetDateTime>- Returns:
- spec builder
-
min
Specifies the lower bound.- Specified by:
minin interfaceTemporalGeneratorSpec<OffsetDateTime>- Parameters:
min- lower bound (inclusive)- Returns:
- spec builder
- Since:
- 4.6.0
- See Also:
-
max
Specifies the upper bound.- Specified by:
maxin interfaceTemporalGeneratorSpec<OffsetDateTime>- 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<OffsetDateTime>- Parameters:
min- lower bound (inclusive)max- upper bound (inclusive)- Returns:
- spec builder
- See Also:
-
truncatedTo
Truncates generated values to the specified unit.- Specified by:
truncatedToin interfaceTruncatableTemporalGeneratorSpec<OffsetDateTime>- Parameters:
unit- to truncate to- Returns:
- spec builder
-
nullable
OffsetDateTimeGeneratorSpec nullable()Indicates thatnullvalue can be generated.- Specified by:
nullablein interfaceNullableGeneratorSpec<OffsetDateTime>- Specified by:
nullablein interfaceTemporalGeneratorSpec<OffsetDateTime>- Returns:
- spec builder
-