Package kos.core.validation
Class DefaultValidation
java.lang.Object
kos.core.validation.DefaultValidation
- All Implemented Interfaces:
Validation
A predicate-based
Validation.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static classAValidationthat assume all objects are valid. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ValidationThe fallbackValidationimplementation.private final Map<Class,Validation> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns a static representation of the object being validated.voidmemorise(Validation validation) private voidpopulateWithClassAndItsInterfaces(Queue<Class> stack, Class klass) io.vertx.core.FutureValidates theobject.
-
Field Details
-
validationCache
-
fallbackValidation
The fallbackValidationimplementation. It will be called whenever no other validation is available for a given type.
-
-
Constructor Details
-
DefaultValidation
public DefaultValidation()
-
-
Method Details
-
memorise
-
validate
Description copied from interface:ValidationValidates theobject. It is expected that the validated object will be returned in the successfulFutureresult.- Specified by:
validatein interfaceValidation- Parameters:
object- the object to be validated
-
populateWithClassAndItsInterfaces
-
getTypeOfTheObjectBeingValidated
Description copied from interface:ValidationReturns a static representation of the object being validated.- Specified by:
getTypeOfTheObjectBeingValidatedin interfaceValidation
-