Class ByteArgument<C>
java.lang.Object
cloud.commandframework.arguments.CommandArgument<C,Byte>
cloud.commandframework.arguments.standard.ByteArgument<C>
- All Implemented Interfaces:
CloudKeyHolder<Byte>
,Comparable<CommandArgument<?,
?>>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
static final class
Byte parse exceptionstatic 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 TypeMethodDescriptionstatic <C> @NonNull ByteArgument.Builder<C>
Create a newByteArgument.Builder
.byte
getMax()
Get the maximum accepted byteeger that could have been parsedbyte
getMin()
Get the minimum accepted byteeger that could have been parsedstatic <C> @NonNull ByteArgument.Builder<C>
newBuilder
(@NonNull String name) Deprecated.static <C> @NonNull CommandArgument<C,
Byte> Create a new requiredByteArgument
.static <C> @NonNull CommandArgument<C,
Byte> Create a new optionalByteArgument
.static <C> @NonNull CommandArgument<C,
Byte> Create a new optionalByteArgument
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
-
builder
@API(status=STABLE, since="1.8.0") public static <C> @NonNull ByteArgument.Builder<C> builder(@NonNull String name) Create a newByteArgument.Builder
.- Type Parameters:
C
- sender type- Parameters:
name
- argument name- Returns:
- new
ByteArgument.Builder
- Since:
- 1.8.0
-
newBuilder
@API(status=DEPRECATED, since="1.8.0") @Deprecated public static <C> @NonNull ByteArgument.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 requiredByteArgument
.- Type Parameters:
C
- Command sender type- Parameters:
name
- Argument name- Returns:
- Created argument
-
optional
Create a new optionalByteArgument
.- Type Parameters:
C
- Command sender type- Parameters:
name
- Argument name- Returns:
- Created argument
-
optional
Create a new optionalByteArgument
with the specified default value.- Type Parameters:
C
- Command sender type- Parameters:
name
- Argument namedefaultNum
- Default num- Returns:
- Created argument
-
getMin
public byte getMin()Get the minimum accepted byteeger that could have been parsed- Returns:
- Minimum byteeger
-
getMax
public byte getMax()Get the maximum accepted byteeger that could have been parsed- Returns:
- Maximum byteeger
-
builder(String)