Class MaximumValidator
java.lang.Object
com.github.kaktushose.jda.commands.dispatching.validation.impl.MaximumValidator
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
apply
(@NotNull Object argument, @NotNull Object annotation, @NotNull InvocationContext<?> context) Validates an argument.
-
Constructor Details
-
MaximumValidator
public MaximumValidator()
-
-
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 a number whose value must be less or equal to the specified maximum.- Specified by:
apply
in interfaceValidator
- Parameters:
argument
- the argument to validateannotation
- the corresponding annotationcontext
- the correspondingInvocationContext
- Returns:
true
if the argument is a number whose value is less or equal to the specified maximum
-