public class FloatGenerator extends DecimalGenerator<Float>
float or Float.| Constructor and Description |
|---|
FloatGenerator() |
| 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.
|
Float |
generate(SourceOfRandomness random,
GenerationStatus status) |
protected Predicate<Float> |
inRange() |
protected Float |
leastMagnitude() |
protected Function<BigDecimal,Float> |
narrow() |
protected Float |
negate(Float target) |
protected boolean |
negative(Float target) |
protected Function<Float,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.minFloat() and InRange.maxFloat(), if non-empty.range - annotation that gives the range's constraintspublic Float generate(SourceOfRandomness random, GenerationStatus status)
protected Function<Float,BigDecimal> widen()
widen in class DecimalGenerator<Float>protected Function<BigDecimal,Float> narrow()
narrow in class DecimalGenerator<Float>protected Predicate<Float> inRange()
inRange in class DecimalGenerator<Float>protected Float leastMagnitude()
leastMagnitude in class DecimalGenerator<Float>protected boolean negative(Float target)
negative in class DecimalGenerator<Float>protected Float negate(Float target)
negate in class DecimalGenerator<Float>Copyright © 2016. All rights reserved.