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