V - the type of values this constraint checkspublic abstract class ConstraintChecker<V,T extends SerializableType<V>> extends Object
SerializableType's constraints.ConfigLeaf,
SerializableType| Modifier and Type | Method and Description |
|---|---|
abstract boolean |
comprehends(T cfg,
T cfg2)
Returns
true if cfg comprehends cfg2. |
abstract TypeCheckResult<V> |
test(T cfg,
V value)
Tests a value against this
Constraint. |
public abstract TypeCheckResult<V> test(T cfg, V value)
Constraint.
This method may provide a corrected value that can be used if the input value is invalid.
cfg - the type configuration to test againstvalue - the valuetrue if value satisfies the constraintpublic abstract boolean comprehends(T cfg, T cfg2)
true 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)
cfg - the tested comprehensive type configurationcfg2 - the tested comprehended type configurationtrue if cfg comprehends cfg2,
otherwise false.SerializableType.isAssignableFrom(SerializableType)