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