Class ByteArgument.ByteParser<C>
- java.lang.Object
-
- cloud.commandframework.arguments.standard.ByteArgument.ByteParser<C>
-
- All Implemented Interfaces:
ArgumentParser<C,java.lang.Byte>
- Enclosing class:
- ByteArgument<C>
public static final class ByteArgument.ByteParser<C> extends java.lang.Object implements ArgumentParser<C,java.lang.Byte>
-
-
Constructor Summary
Constructors Constructor Description ByteParser(byte min, byte max)
Construct a new byte parser
-
Method Summary
Modifier and Type Method Description byte
getMax()
Get the max valuebyte
getMin()
Get the min valueboolean
isContextFree()
Check whether or not this argument parser is context free.@NonNull ArgumentParseResult<java.lang.Byte>
parse(@NonNull CommandContext<C> commandContext, @NonNull java.util.Queue<@NonNull java.lang.String> inputQueue)
Parse command input into a command result@NonNull java.util.List<@NonNull java.lang.String>
suggestions(@NonNull CommandContext<C> commandContext, @NonNull java.lang.String input)
Get a list of suggested arguments that would be correctly parsed by this parser
-
-
-
Method Detail
-
parse
public @NonNull ArgumentParseResult<java.lang.Byte> parse(@NonNull CommandContext<C> commandContext, @NonNull java.util.Queue<@NonNull java.lang.String> inputQueue)
Description copied from interface:ArgumentParser
Parse command input into a command result- Specified by:
parse
in interfaceArgumentParser<C,java.lang.Byte>
- Parameters:
commandContext
- Command contextinputQueue
- The queue of arguments- Returns:
- Parsed command result
-
isContextFree
public boolean isContextFree()
Description copied from interface:ArgumentParser
Check whether or not this argument parser is context free. A context free parser will not use the provided command context, and so supports impromptu parsing- Specified by:
isContextFree
in interfaceArgumentParser<C,java.lang.Byte>
- Returns:
true
if the parser is context free, elsefalse
-
suggestions
public @NonNull java.util.List<@NonNull java.lang.String> suggestions(@NonNull CommandContext<C> commandContext, @NonNull java.lang.String input)
Description copied from interface:ArgumentParser
Get a list of suggested arguments that would be correctly parsed by this parser- Specified by:
suggestions
in interfaceArgumentParser<C,java.lang.Byte>
- Parameters:
commandContext
- Command contextinput
- Input string- Returns:
- List of suggestions
-
getMax
public byte getMax()
Get the max value- Returns:
- Max value
-
getMin
public byte getMin()
Get the min value- Returns:
- Min value
-
-