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