public class IntegerGenerator extends IntegralGenerator<Integer>
int or Integer.| Constructor and Description |
|---|
IntegerGenerator() |
| 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.
|
Integer |
generate(SourceOfRandomness random,
GenerationStatus status) |
protected Predicate<Integer> |
inRange() |
protected Integer |
leastMagnitude() |
protected Function<BigInteger,Integer> |
narrow() |
protected Integer |
negate(Integer target) |
protected boolean |
negative(Integer 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.minInt() and InRange.maxInt(), if non-empty.range - annotation that gives the range's constraintspublic Integer generate(SourceOfRandomness random, GenerationStatus status)
protected Function<BigInteger,Integer> narrow()
narrow in class IntegralGenerator<Integer>protected Predicate<Integer> inRange()
inRange in class IntegralGenerator<Integer>protected Integer leastMagnitude()
leastMagnitude in class IntegralGenerator<Integer>protected boolean negative(Integer target)
negative in class IntegralGenerator<Integer>protected Integer negate(Integer target)
negate in class IntegralGenerator<Integer>Copyright © 2016. All rights reserved.