Package io.manebot.command.search
Class CommandArgumentSearch
- java.lang.Object
-
- io.manebot.command.executor.chained.argument.CommandArgument
-
- io.manebot.command.search.CommandArgumentSearch
-
public class CommandArgumentSearch extends CommandArgument
The search command argument type. Builds Search objects for use by a SearchHandler.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
CommandArgumentSearch.Argument
-
Constructor Summary
Constructors Constructor Description CommandArgumentSearch()
CommandArgumentSearch(CommandArgumentSearch.Argument argument)
-
Method Summary
Modifier and Type Method Description boolean
canCoexist(CommandArgument b)
boolean
canExtend(CommandArgument b)
ChainPriority
cast(ChainState state)
Parses a search lexically; does NOT execute any search or validate arguments.java.lang.String
getHelpString()
-
-
-
Constructor Detail
-
CommandArgumentSearch
public CommandArgumentSearch()
-
CommandArgumentSearch
public CommandArgumentSearch(CommandArgumentSearch.Argument argument)
-
-
Method Detail
-
getHelpString
public java.lang.String getHelpString()
- Specified by:
getHelpString
in classCommandArgument
-
cast
public ChainPriority cast(ChainState state)
Parses a search lexically; does NOT execute any search or validate arguments. This behavior defaults to the lexical parser statically defined in the Search class, on the parse method.- Specified by:
cast
in classCommandArgument
- Parameters:
state
- State to parse. Since this argument parses multiple lines, it is entirely consumed.- Returns:
- ChainPriority instance that was determined.
- Throws:
java.lang.IllegalArgumentException
- if there was a problem lexically parsing the chain state.
-
canExtend
public boolean canExtend(CommandArgument b)
- Specified by:
canExtend
in classCommandArgument
-
canCoexist
public boolean canCoexist(CommandArgument b)
- Specified by:
canCoexist
in classCommandArgument
-
-