Class ArgumentString
java.lang.Object
org.teleight.teleightbots.commands.builder.argument.Argument<String>
org.teleight.teleightbots.commands.builder.argument.ArgumentString
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionArgumentString(String id) Constructs an ArgumentString with the specified identifier.ArgumentString(String id, boolean greedyMatch) Constructs an ArgumentString with the specified identifier. -
Method Summary
-
Constructor Details
-
ArgumentString
Constructs an ArgumentString with the specified identifier.- Parameters:
id- the identifier of the argumentgreedyMatch- iftrue, this argument will consume all remaining input until the end of the message; iffalse, it will only consume a single word
-
ArgumentString
Constructs an ArgumentString with the specified identifier. ThegreedyMatchfield is set to false by default.- Parameters:
id- the identifier of the argument
-
-
Method Details
-
parse
Returns the input string as it is.- Specified by:
parsein classArgument<String>- Parameters:
input- the input string to be parsed- Returns:
- the input string as it is
- Throws:
ArgumentSyntaxException- if the input string cannot be parsed
-
greedy
public boolean greedy()Returns whether this argument greedily consumes all remaining input.- Returns:
trueif this argument consumes all remaining input,falseotherwise
-