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