Class VariableLengthArgumentComponent<T,V>
java.lang.Object
redempt.ordinate.component.abstracts.CommandComponent<T>
redempt.ordinate.component.argument.ArgumentComponent<T,V>
redempt.ordinate.component.argument.VariableLengthArgumentComponent<T,V>
- All Implemented Interfaces:
HelpProvider<T>
,Named
-
Constructor Summary
ConstructorDescriptionVariableLengthArgumentComponent
(String name, ArgType<T, V> type, boolean optional, MessageFormatter<T> missingError, MessageFormatter<T> invalidError) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addHelp
(HelpBuilder<T> help) complete
(CommandContext<T> context, Set<String> completions) int
int
int
int
boolean
parse
(CommandContext<T> context) Methods inherited from class redempt.ordinate.component.argument.ArgumentComponent
getInvalidError, getMissingError, getName, getType, setType
-
Constructor Details
-
VariableLengthArgumentComponent
public VariableLengthArgumentComponent(String name, ArgType<T, V> type, boolean optional, MessageFormatter<T> missingError, MessageFormatter<T> invalidError)
-
-
Method Details
-
isOptional
public boolean isOptional()- Overrides:
isOptional
in classArgumentComponent<T,
V>
-
getMaxConsumedArgs
public int getMaxConsumedArgs()- Overrides:
getMaxConsumedArgs
in classArgumentComponent<T,
V>
-
getMinConsumedArgs
public int getMinConsumedArgs()- Overrides:
getMinConsumedArgs
in classCommandComponent<T>
-
getMaxParsedObjects
public int getMaxParsedObjects()- Overrides:
getMaxParsedObjects
in classArgumentComponent<T,
V>
-
getPriority
public int getPriority()- Overrides:
getPriority
in classArgumentComponent<T,
V>
-
parse
- Overrides:
parse
in classArgumentComponent<T,
V>
-
complete
- Overrides:
complete
in classArgumentComponent<T,
V>
-
addHelp
- Specified by:
addHelp
in interfaceHelpProvider<T>
- Overrides:
addHelp
in classArgumentComponent<T,
V>
-