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