| Constructor and Description |
|---|
DurationGenerator() |
| Modifier and Type | Method and Description |
|---|---|
void |
configure(InRange range)
|
Duration |
generate(SourceOfRandomness random,
GenerationStatus status) |
addComponentGenerators, canGenerateForParametersOfTypes, canRegisterAsType, canShrink, compatibleWithTypeParameter, configurationAnnotationsOn, configure, configure, copy, doShrink, gen, gen, hasComponents, magnitude, narrow, numberOfNeededComponents, provide, shrink, typespublic void configure(InRange range)
Tells this generator to produce values within a specified minimum and/or maximum, inclusive, with uniform distribution, down to the nanosecond.
If an endpoint of the range is not specified, the generator will use
durations with second values of either Long.MIN_VALUE or
Long.MAX_VALUE (with nanoseconds set to 999,999,999) as
appropriate.
InRange.format() is ignored. Durations are always
parsed using formats based on the ISO-8601 duration format
PnDTnHnMn.nS with days considered to be exactly 24 hours.
range - annotation that gives the range's constraintsDuration.parse(CharSequence)public Duration generate(SourceOfRandomness random, GenerationStatus status)
Copyright © 2019. All rights reserved.