Package org.instancio.generator.specs
Interface DurationGeneratorSpec
- All Superinterfaces:
GeneratorSpec<Duration>
- All Known Implementing Classes:
DurationGenerator
Generator spec for
Duration
.- Since:
- 1.5.4
-
Method Summary
Modifier and TypeMethodDescriptionAllow aDuration
of length zero to be generated.of
(long minAmount, long maxAmount, TemporalUnit unit) Generate aDuration
in the given range, measured in specified units.
-
Method Details
-
of
Generate aDuration
in the given range, measured in specified units.- Parameters:
minAmount
- minimum duration amount (inclusive)maxAmount
- maximum duration amount (inclusive)unit
- unit the duration is measured in- Returns:
- spec builder
- Since:
- 1.5.4
-
allowZero
DurationGeneratorSpec allowZero()Allow aDuration
of length zero to be generated.- Returns:
- spec builder
- Since:
- 1.5.4
-