Class StringArgument<O>
- java.lang.Object
-
- me.s3ns3iw00.jcommands.argument.Argument<O>
-
- me.s3ns3iw00.jcommands.argument.InputArgument<I,O>
-
- me.s3ns3iw00.jcommands.argument.AutocompletableInputArgument<java.lang.String,O>
-
- me.s3ns3iw00.jcommands.argument.type.StringArgument<O>
-
public class StringArgument<O> extends AutocompletableInputArgument<java.lang.String,O>
An argument that only acceptsString
input
-
-
Constructor Summary
Constructors Constructor Description StringArgument(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.String>
whenNotInRange(int min, int 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
-
StringArgument
public StringArgument(java.lang.String name, java.lang.String description, java.lang.Class<O> resultType)
-
-
Method Detail
-
whenNotInRange
public ArgumentValidation<java.lang.String> whenNotInRange(int min, int 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)
-
-