Class NumberArgument<O>
- java.lang.Object
-
- me.s3ns3iw00.jcommands.argument.Argument<O>
-
- me.s3ns3iw00.jcommands.argument.InputArgument<I,O>
-
- me.s3ns3iw00.jcommands.argument.AutocompletableInputArgument<java.lang.Long,O>
-
- me.s3ns3iw00.jcommands.argument.type.NumberArgument<O>
-
public class NumberArgument<O> extends AutocompletableInputArgument<java.lang.Long,O>
An argument that only acceptsLong
input inside long's range
-
-
Constructor Summary
Constructors Constructor Description NumberArgument(java.lang.String name, java.lang.String description, java.lang.Class<O> resultType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ArgumentValidation<java.lang.Long>
whenNotInRange(long min, long max)
Creates an inclusive range validation-
Methods inherited from class me.s3ns3iw00.jcommands.argument.AutocompletableInputArgument
addAutocomplete, getAutocompletes, getCommandOption
-
Methods inherited from class me.s3ns3iw00.jcommands.argument.InputArgument
convertResult, getArgumentValidator, getResultConverter, getResultType, isOptional, setOptional
-
Methods inherited from class me.s3ns3iw00.jcommands.argument.Argument
getDescription, getMismatchListener, getName, getType, setOnMismatch
-
-
-
-
Constructor Detail
-
NumberArgument
public NumberArgument(java.lang.String name, java.lang.String description, java.lang.Class<O> resultType)
-
-
Method Detail
-
whenNotInRange
public ArgumentValidation<java.lang.Long> whenNotInRange(long min, long max)
Creates an inclusive range validation- Parameters:
min
- the minimummax
- the maximum- Returns:
- the
ArgumentValidation
to be able to specify a custom response withArgumentValidation.thenRespond(ArgumentMismatchEventListener)
-
-