Class ShortArgument<C>
java.lang.Object
cloud.commandframework.arguments.CommandArgument<C,Short>
cloud.commandframework.arguments.standard.ShortArgument<C>
- All Implemented Interfaces:
CloudKeyHolder<Short>,Comparable<CommandArgument<?,?>>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classstatic final classstatic final classNested classes/interfaces inherited from class cloud.commandframework.arguments.CommandArgument
CommandArgument.TypedBuilder<C,T, B extends CommandArgument.Builder<C, T>> -
Method Summary
Modifier and TypeMethodDescriptionshortgetMax()Get the maximum accepted short that could have been parsedshortgetMin()Get the minimum accepted short that could have been parsedstatic <C> @NonNull ShortArgument.Builder<C>newBuilder(@NonNull String name) Create a newShortArgument.Builder.static <C> @NonNull CommandArgument<C,Short> Create a new requiredShortArgument.static <C> @NonNull CommandArgument<C,Short> Create a new optionalShortArgument.static <C> @NonNull CommandArgument<C,Short> Create a new requiredShortArgumentwith the specified default value.Methods inherited from class cloud.commandframework.arguments.CommandArgument
addPreprocessor, compareTo, copy, equals, getDefaultDescription, getDefaultValue, getKey, getName, getOwningCommand, getParser, getSuggestionsProvider, getValueType, hasDefaultValue, hashCode, isArgumentRegistered, isRequired, ofType, ofType, preprocess, setArgumentRegistered, setOwningCommand, toString
-
Method Details
-
newBuilder
Create a newShortArgument.Builder.- Type Parameters:
C- Command sender type- Parameters:
name- Name of the argument- Returns:
- Created builder
-
of
Create a new requiredShortArgument.- Type Parameters:
C- Command sender type- Parameters:
name- Argument name- Returns:
- Created argument
-
optional
Create a new optionalShortArgument.- Type Parameters:
C- Command sender type- Parameters:
name- Argument name- Returns:
- Created argument
-
optional
public static <C> @NonNull CommandArgument<C,Short> optional(@NonNull String name, short defaultNum) Create a new requiredShortArgumentwith the specified default value.- Type Parameters:
C- Command sender type- Parameters:
name- Argument namedefaultNum- Default value- Returns:
- Created argument
-
getMin
public short getMin()Get the minimum accepted short that could have been parsed- Returns:
- Minimum short
-
getMax
public short getMax()Get the maximum accepted short that could have been parsed- Returns:
- Maximum short
-