public final class DecimalConstraintChecker extends ConstraintChecker<BigDecimal,DecimalSerializableType>
DecimalConfigType's range constraint.| Modifier and Type | Method and Description |
|---|---|
boolean |
comprehends(DecimalSerializableType cfg,
DecimalSerializableType cfg2)
Returns
true if cfg comprehends cfg2. |
static DecimalConstraintChecker |
instance() |
TypeCheckResult<BigDecimal> |
test(DecimalSerializableType cfg,
BigDecimal value)
Tests a value against this
Constraint. |
public static DecimalConstraintChecker instance()
public TypeCheckResult<BigDecimal> test(DecimalSerializableType cfg, BigDecimal value)
ConstraintCheckerConstraint.
This method may provide a corrected value that can be used if the input value is invalid.
test in class ConstraintChecker<BigDecimal,DecimalSerializableType>cfg - the type configuration to test againstvalue - the valuetrue if value satisfies the constraintpublic boolean comprehends(DecimalSerializableType cfg, DecimalSerializableType cfg2)
ConstraintCheckertrue if cfg comprehends cfg2.
A type configuration comprehends another if it accepts every value that the other does.
forall x, cfg2.accepts(x) => cfg.accepts(x)
comprehends in class ConstraintChecker<BigDecimal,DecimalSerializableType>cfg - the tested comprehensive type configurationcfg2 - the tested comprehended type configurationtrue if cfg comprehends cfg2,
otherwise false.SerializableType.isAssignableFrom(SerializableType)