T
- type of values this generator producespublic abstract class DecimalGenerator<T extends Number> extends Generator<T>
double
and
BigDecimal
.Modifier | Constructor and Description |
---|---|
protected |
DecimalGenerator(Class<T> type) |
protected |
DecimalGenerator(List<Class<T>> types) |
Modifier and Type | Method and Description |
---|---|
List<T> |
doShrink(SourceOfRandomness random,
T larger) |
protected abstract Predicate<T> |
inRange() |
protected abstract T |
leastMagnitude() |
protected abstract Function<BigDecimal,T> |
narrow() |
protected abstract T |
negate(T target) |
protected abstract boolean |
negative(T target) |
protected abstract Function<T,BigDecimal> |
widen() |
addComponentGenerators, canGenerateForParametersOfTypes, canRegisterAsType, canShrink, compatibleWithTypeParameter, configurationAnnotationsOn, configure, configure, gen, hasComponents, narrow, numberOfNeededComponents, provide, shrink, types
public List<T> doShrink(SourceOfRandomness random, T larger)
protected abstract Function<T,BigDecimal> widen()
protected abstract Function<BigDecimal,T> narrow()
protected abstract T leastMagnitude()
protected abstract boolean negative(T target)
© Copyright 2010-2016 Paul R. Holser, Jr. All rights reserved. Licensed under The MIT License. pholser@alumni.rice.edu