public class BigIntegerGenerator extends IntegralGenerator<BigInteger>
Produces values of type BigInteger.
With no additional configuration, the generated values are chosen from
a range with a magnitude decided by
GenerationStatus.size().
| Constructor and Description |
|---|
BigIntegerGenerator() |
| Modifier and Type | Method and Description |
|---|---|
void |
configure(InRange range)
|
BigInteger |
generate(SourceOfRandomness random,
GenerationStatus status) |
protected Predicate<BigInteger> |
inRange() |
protected BigInteger |
leastMagnitude() |
protected Function<BigInteger,BigInteger> |
narrow() |
protected BigInteger |
negate(BigInteger target) |
protected boolean |
negative(BigInteger target) |
doShrink, widenaddComponentGenerators, canGenerateForParametersOfTypes, canRegisterAsType, canShrink, compatibleWithTypeParameter, configurationAnnotationsOn, configure, configure, hasComponents, narrow, numberOfNeededComponents, provideRepository, shrink, typespublic void configure(InRange range)
Tells this generator to produce values within a specified minimum and/or maximum inclusive, with uniform distribution.
If an endpoint of the range is not specified, its value takes on
a magnitude influenced by
GenerationStatus.size().
range - annotation that gives the range's constraintspublic BigInteger generate(SourceOfRandomness random, GenerationStatus status)
generate in class Generator<BigInteger>protected Function<BigInteger,BigInteger> narrow()
narrow in class IntegralGenerator<BigInteger>protected Predicate<BigInteger> inRange()
inRange in class IntegralGenerator<BigInteger>protected BigInteger leastMagnitude()
leastMagnitude in class IntegralGenerator<BigInteger>protected boolean negative(BigInteger target)
negative in class IntegralGenerator<BigInteger>protected BigInteger negate(BigInteger target)
negate in class IntegralGenerator<BigInteger>Copyright © 2016. All rights reserved.