public class BooleanConstraintChecker extends ConstraintChecker<Boolean,BooleanSerializableType>
| Modifier and Type | Method and Description |
|---|---|
boolean |
comprehends(BooleanSerializableType cfg,
BooleanSerializableType cfg2)
Returns
true if cfg comprehends cfg2. |
static BooleanConstraintChecker |
instance() |
TypeCheckResult<Boolean> |
test(BooleanSerializableType cfg,
Boolean value)
Tests a value against this
Constraint. |
public static BooleanConstraintChecker instance()
public TypeCheckResult<Boolean> test(BooleanSerializableType cfg, Boolean value)
ConstraintCheckerConstraint.
This method may provide a corrected value that can be used if the input value is invalid.
test in class ConstraintChecker<Boolean,BooleanSerializableType>cfg - the type configuration to test againstvalue - the valuetrue if value satisfies the constraintpublic boolean comprehends(BooleanSerializableType cfg, BooleanSerializableType 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<Boolean,BooleanSerializableType>cfg - the tested comprehensive type configurationcfg2 - the tested comprehended type configurationtrue if cfg comprehends cfg2,
otherwise false.SerializableType.isAssignableFrom(SerializableType)