Package org.instancio.generator.specs
Interface LocalDateTimeGeneratorAsSpec
- All Superinterfaces:
AsGeneratorSpec<LocalDateTime>,GeneratorSpec<LocalDateTime>,NullableGeneratorSpec<LocalDateTime>,TemporalAsGeneratorSpec<LocalDateTime>,TemporalGeneratorSpec<LocalDateTime>,TruncatableTemporalSpec<LocalDateTime>
public interface LocalDateTimeGeneratorAsSpec
extends TemporalAsGeneratorSpec<LocalDateTime>, TruncatableTemporalSpec<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 start, LocalDateTime 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
LocalDateTimeGeneratorAsSpec past()Generate a value in the past.- Specified by:
pastin interfaceTemporalAsGeneratorSpec<LocalDateTime>- Specified by:
pastin interfaceTemporalGeneratorSpec<LocalDateTime>- Returns:
- spec builder
-
future
LocalDateTimeGeneratorAsSpec future()Generate a value in the future.- Specified by:
futurein interfaceTemporalAsGeneratorSpec<LocalDateTime>- Specified by:
futurein interfaceTemporalGeneratorSpec<LocalDateTime>- Returns:
- spec builder
-
range
Generate a value within the given range.- Specified by:
rangein interfaceTemporalAsGeneratorSpec<LocalDateTime>- Specified by:
rangein interfaceTemporalGeneratorSpec<LocalDateTime>- Parameters:
start- lower bound (inclusive)end- upper bound (inclusive)- Returns:
- spec builder
-
truncatedTo
Truncates generated values to the specified unit.- Specified by:
truncatedToin interfaceTruncatableTemporalSpec<LocalDateTime>- Parameters:
unit- to truncate to- Returns:
- spec builder
-
nullable
LocalDateTimeGeneratorAsSpec nullable()Indicates thatnullvalue can be generated.- Specified by:
nullablein interfaceNullableGeneratorSpec<LocalDateTime>- Specified by:
nullablein interfaceTemporalGeneratorSpec<LocalDateTime>- Returns:
- spec builder
-