public class OptionalLongGenerator extends Generator<OptionalLong>
OptionalLong.| Constructor and Description |
|---|
OptionalLongGenerator() |
| Modifier and Type | Method and Description |
|---|---|
void |
configure(InRange range)
Tells this generator to produce values, when
present, within a specified minimum
and/or maximum, inclusive, with uniform distribution. |
List<OptionalLong> |
doShrink(SourceOfRandomness random,
OptionalLong larger) |
OptionalLong |
generate(SourceOfRandomness random,
GenerationStatus status) |
BigDecimal |
magnitude(Object value) |
addComponentGenerators, canGenerateForParametersOfTypes, canRegisterAsType, canShrink, compatibleWithTypeParameter, configurationAnnotationsOn, configure, configure, copy, gen, gen, hasComponents, narrow, numberOfNeededComponents, provide, shrink, typespublic void configure(InRange range)
present, within a specified minimum
and/or maximum, inclusive, with uniform distribution.
InRange.min() and InRange.max() take precedence over
InRange.minLong() and InRange.maxLong(), if non-empty.range - annotation that gives the range's constraintspublic OptionalLong generate(SourceOfRandomness random, GenerationStatus status)
public List<OptionalLong> doShrink(SourceOfRandomness random, OptionalLong larger)
doShrink in class Generator<OptionalLong>public BigDecimal magnitude(Object value)
magnitude in class Generator<OptionalLong>© Copyright 2010-2020 Paul R. Holser, Jr. All rights reserved. Licensed under The MIT License. pholser@alumni.rice.edu