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.

@FunctionalInterface public interface Validator
Generic top level interface for validators. A validator checks if a command argument fulfills the given constraint.
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    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 validate
      annotation - the corresponding annotation
      context - the corresponding InvocationContext
      Returns:
      true if the argument passes the constraints