Class BooleanArgument.BooleanParser<C>
- java.lang.Object
-
- cloud.commandframework.arguments.standard.BooleanArgument.BooleanParser<C>
-
- All Implemented Interfaces:
ArgumentParser<C,java.lang.Boolean>
- Enclosing class:
- BooleanArgument<C>
public static final class BooleanArgument.BooleanParser<C> extends java.lang.Object implements ArgumentParser<C,java.lang.Boolean>
-
-
Field Summary
-
Fields inherited from interface cloud.commandframework.arguments.parser.ArgumentParser
DEFAULT_ARGUMENT_COUNT
-
-
Constructor Summary
Constructors Constructor Description BooleanParser(boolean liberal)Construct a new boolean parser
-
Method Summary
Modifier and Type Method Description booleanisContextFree()Check whether or not this argument parser is context free.@NonNull ArgumentParseResult<java.lang.Boolean>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-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface cloud.commandframework.arguments.parser.ArgumentParser
getRequestedArgumentCount
-
-
-
-
Method Detail
-
parse
public @NonNull ArgumentParseResult<java.lang.Boolean> parse(@NonNull CommandContext<C> commandContext, @NonNull java.util.Queue<@NonNull java.lang.String> inputQueue)
Description copied from interface:ArgumentParserParse command input into a command result- Specified by:
parsein interfaceArgumentParser<C,java.lang.Boolean>- Parameters:
commandContext- Command contextinputQueue- The queue of arguments- Returns:
- Parsed command result
-
suggestions
public @NonNull java.util.List<@NonNull java.lang.String> suggestions(@NonNull CommandContext<C> commandContext, @NonNull java.lang.String input)
Description copied from interface:ArgumentParserGet a list of suggested arguments that would be correctly parsed by this parser- Specified by:
suggestionsin interfaceArgumentParser<C,java.lang.Boolean>- Parameters:
commandContext- Command contextinput- Input string- Returns:
- List of suggestions
-
isContextFree
public boolean isContextFree()
Description copied from interface:ArgumentParserCheck 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:
isContextFreein interfaceArgumentParser<C,java.lang.Boolean>- Returns:
trueif the parser is context free, elsefalse
-
-