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