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, widen
addComponentGenerators, canGenerateForParametersOfTypes, canRegisterAsType, canShrink, compatibleWithTypeParameter, configurationAnnotationsOn, configure, configure, gen, hasComponents, narrow, numberOfNeededComponents, provide, shrink, types
public 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 2010-2016 Paul R. Holser, Jr. All rights reserved. Licensed under The MIT License. pholser@alumni.rice.edu