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