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
Modifier and TypeClassDescriptionstatic final class
static final class
static final class
Nested classes/interfaces inherited from class cloud.commandframework.arguments.CommandArgument
CommandArgument.TypedBuilder<C,
T, B extends CommandArgument.Builder<C, T>> -
Method Summary
Modifier and TypeMethodDescriptionlong
getMax()
Get the maximum accepted long that could have been parsedlong
getMin()
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 optionalLongArgument
with 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 optionalLongArgument
with 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
-