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
ConstructorsConstructorDescriptionArgumentComponent(String name, ArgType<T, V> type, MessageFormatter<T> missingError, MessageFormatter<T> invalidError) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddHelp(HelpBuilder<T> help) complete(CommandContext<T> context, Set<String> completions) intintgetName()intgetType()booleanparse(CommandContext<T> context) voidMethods 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:
getMaxConsumedArgsin classCommandComponent<T>
-
getMaxParsedObjects
public int getMaxParsedObjects()- Specified by:
getMaxParsedObjectsin classCommandComponent<T>
-
getPriority
public int getPriority()- Specified by:
getPriorityin classCommandComponent<T>
-
addHelp
- Specified by:
addHelpin interfaceHelpProvider<T>
-
parse
- Specified by:
parsein classCommandComponent<T>
-
complete
- Overrides:
completein classCommandComponent<T>
-
getName
-