Package cdc.validation
Class ValidatorImpl<T>
java.lang.Object
cdc.validation.ValidatorImpl<T>
- All Implemented Interfaces:
Validator<T>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ValidatorImpl<?>createUnchecked(Checker<?> error, Checker<?> warning) explainError(String name) Returns an explanation of the rule that must be respected to avoid errors.explainWarning(String name) Returns an explanation of the rule that must be respected to avoid warnings.getChecker(Validity validity) booleanhasChecker(Validity validity) toString()voidvalidate(T value, String name, ValidationHandler handler) Validates a value.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface cdc.validation.Validator
after, after, afterRaw, getValidity, getValidityRaw, validate, validate, validateRaw, validateRaw, validateRaw
-
Constructor Details
-
ValidatorImpl
-
-
Method Details
-
createUnchecked
-
getValueClass
- Specified by:
getValueClassin interfaceValidator<T>- Returns:
- The class of values validated by this validator.
-
explainError
Description copied from interface:ValidatorReturns an explanation of the rule that must be respected to avoid errors.- Specified by:
explainErrorin interfaceValidator<T>- Parameters:
name- The name that must be given to value in messages.- Returns:
- An explanation of the rule that must be respected to avoid errors.
-
explainWarning
Description copied from interface:ValidatorReturns an explanation of the rule that must be respected to avoid warnings.- Specified by:
explainWarningin interfaceValidator<T>- Parameters:
name- The name that must be given to value in messages.- Returns:
- An explanation of the rule that must be respected to avoid warnings.
-
validate
Description copied from interface:ValidatorValidates a value. -
getChecker
-
hasChecker
-
toString
-