Package org.instancio.generator.specs
Interface LocalTimeSpec
- All Superinterfaces:
GeneratorSpec<LocalTime>,NullableGeneratorSpec<LocalTime>,TemporalGeneratorSpec<LocalTime>,TemporalSpec<LocalTime>,TruncatableTemporalSpec<LocalTime>,ValueSpec<LocalTime>
Spec for generating
LocalTime values.- Since:
- 2.6.0
-
Method Summary
Modifier and TypeMethodDescriptionfuture()Generate a value in the future.nullable()Specifies that anullvalue can be generatedpast()Generate a value in the past.Generate a value within the given range.truncatedTo(TemporalUnit unit) Truncates generated values to the specified unit.
-
Method Details
-
past
LocalTimeSpec past()Generate a value in the past.- Specified by:
pastin interfaceTemporalGeneratorSpec<LocalTime>- Specified by:
pastin interfaceTemporalSpec<LocalTime>- Returns:
- spec builder
-
future
LocalTimeSpec future()Generate a value in the future.- Specified by:
futurein interfaceTemporalGeneratorSpec<LocalTime>- Specified by:
futurein interfaceTemporalSpec<LocalTime>- Returns:
- spec builder
-
range
Generate a value within the given range.- Specified by:
rangein interfaceTemporalGeneratorSpec<LocalTime>- Specified by:
rangein interfaceTemporalSpec<LocalTime>- Parameters:
start- lower bound (inclusive)end- upper bound (inclusive)- Returns:
- spec builder
-
truncatedTo
Truncates generated values to the specified unit.- Specified by:
truncatedToin interfaceTruncatableTemporalSpec<LocalTime>- Parameters:
unit- to truncate to- Returns:
- spec builder
- Since:
- 4.2.0
-
nullable
LocalTimeSpec nullable()Specifies that anullvalue can be generated- Specified by:
nullablein interfaceNullableGeneratorSpec<LocalTime>- Specified by:
nullablein interfaceTemporalGeneratorSpec<LocalTime>- Specified by:
nullablein interfaceTemporalSpec<LocalTime>- Specified by:
nullablein interfaceValueSpec<LocalTime>- Returns:
- spec builder reference
- Since:
- 2.7.0
-