Package org.instancio.generator.specs
Interface YearSpec
- All Superinterfaces:
GeneratorSpec<Year>
,NullableGeneratorSpec<Year>
,TemporalGeneratorSpec<Year>
,TemporalSpec<Year>
,ValueSpec<Year>
- All Known Implementing Classes:
YearGenerator
Spec for generating
Year
values.- Since:
- 2.6.0
-
Method Summary
-
Method Details
-
past
YearSpec past()Description copied from interface:TemporalGeneratorSpec
Generate a value in the past.- Specified by:
past
in interfaceTemporalGeneratorSpec<Year>
- Specified by:
past
in interfaceTemporalSpec<Year>
- Returns:
- spec builder
-
future
YearSpec future()Description copied from interface:TemporalGeneratorSpec
Generate a value in the future.- Specified by:
future
in interfaceTemporalGeneratorSpec<Year>
- Specified by:
future
in interfaceTemporalSpec<Year>
- Returns:
- spec builder
-
range
Description copied from interface:TemporalGeneratorSpec
Generate a value within the given range.- Specified by:
range
in interfaceTemporalGeneratorSpec<Year>
- Specified by:
range
in interfaceTemporalSpec<Year>
- Parameters:
start
- lower bound (inclusive)end
- upper bound (inclusive)- Returns:
- spec builder
-
nullable
YearSpec nullable()Indicates thatnull
value can be generated.- Specified by:
nullable
in interfaceNullableGeneratorSpec<Year>
- Specified by:
nullable
in interfaceTemporalGeneratorSpec<Year>
- Specified by:
nullable
in interfaceTemporalSpec<Year>
- Returns:
- spec builder
- Since:
- 2.7.0
-