public class SubCommandSet<SubCommandDef> extends BaseArgument
| Constructor and Description |
|---|
SubCommandSet(String name,
String usage,
Consumer<SubCommandDef> consumer) |
| Modifier and Type | Method and Description |
|---|---|
SubCommandSet |
add(SubCommand<SubCommandDef> subCommand)
Add a sub-command to the sub-command-set.
|
int |
apply(ArgumentList args)
Try to apply to the argument.
|
String |
getPrefix()
Prefix part of the usage usage message.
|
String |
getSingleLineUsage()
Get the argument's single line usage string.
|
void |
validate()
Called on all the arguments after the parsing is done to validate
if all requirements have been passed.
|
getDefaultValue, getName, getUsage, isHidden, isRepeated, isRequiredpublic SubCommandSet(String name, String usage, Consumer<SubCommandDef> consumer)
public SubCommandSet add(SubCommand<SubCommandDef> subCommand)
subCommand - The sub-command to add.public String getSingleLineUsage()
BaseArgumentgetSingleLineUsage in class BaseArgumentpublic String getPrefix()
BaseArgumentgetPrefix in class BaseArgumentpublic void validate()
throws ArgumentException
BaseArgumentArgumentException if is did not validate with the appropriate
error message.validate in class BaseArgumentArgumentExceptionpublic int apply(ArgumentList args)
BaseArgumentapply in class BaseArgumentargs - The argument list.Copyright © 2016. All rights reserved.