Class UserValidator

java.lang.Object
com.github.kaktushose.jda.commands.dispatching.validation.impl.UserValidator
All Implemented Interfaces:
Validator

public class UserValidator extends Object implements Validator
A Validator implementation that checks the User constraint.
See Also:
  • Constructor Details

    • UserValidator

      public UserValidator()
  • Method Details

    • apply

      public boolean apply(@NotNull @NotNull Object argument, @NotNull @NotNull Object annotation, @NotNull @NotNull InvocationContext<?> context)
      Validates an argument. The argument must be the specified user or member.
      Specified by:
      apply in interface Validator
      Parameters:
      argument - the argument to validate
      annotation - the corresponding annotation
      context - the corresponding InvocationContext
      Returns:
      true if the argument is the specified user or member