Class LongArgument<C>
java.lang.Object
cloud.commandframework.arguments.CommandArgument<C,Long>
cloud.commandframework.arguments.standard.LongArgument<C>
- All Implemented Interfaces:
CloudKeyHolder<Long>,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 TypeMethodDescriptionlonggetMax()Get the maximum accepted long that could have been parsedlonggetMin()Get the minimum accepted long that could have been parsedstatic <C> @NonNull LongArgument.Builder<C>newBuilder(@NonNull String name) Create a newLongArgument.Builder.static <C> @NonNull CommandArgument<C,Long> Create a new requiredLongArgument.static <C> @NonNull CommandArgument<C,Long> Create a new optionalLongArgument.static <C> @NonNull CommandArgument<C,Long> Create a new optionalLongArgumentwith 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 newLongArgument.Builder.- Type Parameters:
C- Command sender type- Parameters:
name- Name of the argument- Returns:
- Created builder
-
of
Create a new requiredLongArgument.- Type Parameters:
C- Command sender type- Parameters:
name- Argument name- Returns:
- Created argument
-
optional
Create a new optionalLongArgument.- Type Parameters:
C- Command sender type- Parameters:
name- Argument name- Returns:
- Created argument
-
optional
Create a new optionalLongArgumentwith the specified default value.- Type Parameters:
C- Command sender type- Parameters:
name- Argument namedefaultNum- Default num- Returns:
- Created argument
-
getMin
public long getMin()Get the minimum accepted long that could have been parsed- Returns:
- Minimum long
-
getMax
public long getMax()Get the maximum accepted long that could have been parsed- Returns:
- Maximum long
-