Package org.instancio.generator.specs
Interface LocalDateTimeGeneratorSpec
- All Superinterfaces:
AsGeneratorSpec<LocalDateTime>,GeneratorSpec<LocalDateTime>,NullableGeneratorSpec<LocalDateTime>,TemporalGeneratorSpec<LocalDateTime>,TruncatableTemporalGeneratorSpec<LocalDateTime>
- All Known Subinterfaces:
LocalDateTimeSpec
public interface LocalDateTimeGeneratorSpec
extends TemporalGeneratorSpec<LocalDateTime>, TruncatableTemporalGeneratorSpec<LocalDateTime>
Generator spec for
LocalDateTime.- 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(LocalDateTime min, LocalDateTime 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, asStringMethods inherited from interface org.instancio.generator.specs.TemporalGeneratorSpec
max, min
-
Method Details
-
past
Generate a value in the past.- Specified by:
pastin interfaceTemporalGeneratorSpec<LocalDateTime>- Returns:
- spec builder
-
future
Generate a value in the future.- Specified by:
futurein interfaceTemporalGeneratorSpec<LocalDateTime>- Returns:
- spec builder
-
range
Generate a value within the given range.- Specified by:
rangein interfaceTemporalGeneratorSpec<LocalDateTime>- 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<LocalDateTime>- Parameters:
unit- to truncate to- Returns:
- spec builder
-
nullable
LocalDateTimeGeneratorSpec nullable()Indicates thatnullvalue can be generated.- Specified by:
nullablein interfaceNullableGeneratorSpec<LocalDateTime>- Specified by:
nullablein interfaceTemporalGeneratorSpec<LocalDateTime>- Returns:
- spec builder
-