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 interfaceCommandArgumentSearch.Argument
-
Constructor Summary
Constructors Constructor Description CommandArgumentSearch()CommandArgumentSearch(CommandArgumentSearch.Argument argument)
-
Method Summary
Modifier and Type Method Description booleancanCoexist(CommandArgument b)booleancanExtend(CommandArgument b)ChainPrioritycast(ChainState state)Parses a search lexically; does NOT execute any search or validate arguments.java.lang.StringgetHelpString()
-
-
-
Constructor Detail
-
CommandArgumentSearch
public CommandArgumentSearch()
-
CommandArgumentSearch
public CommandArgumentSearch(CommandArgumentSearch.Argument argument)
-
-
Method Detail
-
getHelpString
public java.lang.String getHelpString()
- Specified by:
getHelpStringin 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:
castin 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:
canExtendin classCommandArgument
-
canCoexist
public boolean canCoexist(CommandArgument b)
- Specified by:
canCoexistin classCommandArgument
-
-