public class DoubleGenerator extends DecimalGenerator<Double>
double or
Double.| Constructor and Description |
|---|
DoubleGenerator() |
| Modifier and Type | Method and Description |
|---|---|
void |
configure(InRange range)
Tells this generator to produce values within a specified minimum
(inclusive) and/or maximum (exclusive) with uniform distribution.
|
Double |
generate(SourceOfRandomness random,
GenerationStatus status) |
protected Predicate<Double> |
inRange() |
protected Double |
leastMagnitude() |
protected Function<BigDecimal,Double> |
narrow() |
protected Double |
negate(Double target) |
protected boolean |
negative(Double target) |
protected Function<Double,BigDecimal> |
widen() |
doShrinkaddComponentGenerators, 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.minDouble() and InRange.maxDouble(),
if non-empty.range - annotation that gives the range's constraintspublic Double generate(SourceOfRandomness random, GenerationStatus status)
protected Function<Double,BigDecimal> widen()
widen in class DecimalGenerator<Double>protected Function<BigDecimal,Double> narrow()
narrow in class DecimalGenerator<Double>protected Predicate<Double> inRange()
inRange in class DecimalGenerator<Double>protected Double leastMagnitude()
leastMagnitude in class DecimalGenerator<Double>protected boolean negative(Double target)
negative in class DecimalGenerator<Double>protected Double negate(Double target)
negate in class DecimalGenerator<Double>Copyright © 2016. All rights reserved.