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