public class ShortGenerator extends IntegralGenerator<Short>
short or Short.| Constructor and Description |
|---|
ShortGenerator() |
| Modifier and Type | Method and Description |
|---|---|
void |
configure(InRange range)
Tells this generator to produce values within a specified minimum and/or
maximum, inclusive, with uniform distribution.
|
Short |
generate(SourceOfRandomness random,
GenerationStatus status) |
protected Predicate<Short> |
inRange() |
protected Short |
leastMagnitude() |
protected Function<BigInteger,Short> |
narrow() |
protected Short |
negate(Short target) |
protected boolean |
negative(Short target) |
doShrink, widenaddComponentGenerators, canGenerateForParametersOfTypes, canRegisterAsType, canShrink, compatibleWithTypeParameter, configurationAnnotationsOn, configure, configure, hasComponents, narrow, numberOfNeededComponents, provideRepository, shrink, typespublic void configure(InRange range)
InRange.min() and InRange.max() take precedence over
InRange.minShort() and InRange.maxShort(), if non-empty.range - annotation that gives the range's constraintspublic Short generate(SourceOfRandomness random, GenerationStatus status)
protected Function<BigInteger,Short> narrow()
narrow in class IntegralGenerator<Short>protected Predicate<Short> inRange()
inRange in class IntegralGenerator<Short>protected Short leastMagnitude()
leastMagnitude in class IntegralGenerator<Short>protected boolean negative(Short target)
negative in class IntegralGenerator<Short>protected Short negate(Short target)
negate in class IntegralGenerator<Short>Copyright © 2016. All rights reserved.