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