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 TypeMethodDescriptionstatic <C> @NonNull LongArgument.Builder<C>Create a newLongArgument.Builder.longgetMax()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) Deprecated.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
-
builder
@API(status=STABLE, since="1.8.0") public static <C> @NonNull LongArgument.Builder<C> builder(@NonNull String name) Create a newLongArgument.Builder.- Type Parameters:
C- sender type- Parameters:
name- argument name- Returns:
- new
LongArgument.Builder - Since:
- 1.8.0
-
newBuilder
@API(status=DEPRECATED, since="1.8.0") @Deprecated public static <C> @NonNull LongArgument.Builder<C> newBuilder(@NonNull String name) Deprecated.preferbuilder(String)Create a new 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
-
builder(String)