Interface Validator
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Generic top level interface for validators. A validator checks if a command argument fulfills the given constraint.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionboolean
apply
(@NotNull Object argument, @NotNull Object annotation, @NotNull InvocationContext<?> context) Validates an argument.
-
Method Details
-
apply
boolean apply(@NotNull @NotNull Object argument, @NotNull @NotNull Object annotation, @NotNull @NotNull InvocationContext<?> context) Validates an argument.- Parameters:
argument
- the argument to validateannotation
- the corresponding annotationcontext
- the correspondingInvocationContext
- Returns:
true
if the argument passes the constraints
-