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