public static final class Parser.Argument
extends java.lang.Object
Constructor and Description |
---|
Argument(java.lang.String longName,
java.lang.String shortName,
Parser.Arity arity,
java.lang.String help) |
Modifier and Type | Method and Description |
---|---|
Parser.Arity |
getArity()
Gets the arity (number of times an argument value can be provided).
|
java.lang.String |
getCanonicalName()
Gets the canonical name, which is the longName if present or the shortName.
|
java.lang.String |
getHelp()
Gets the argument help text.
|
java.util.Optional<java.lang.String> |
getLongName()
Gets the long name of the argument (e.g., --help).
|
java.util.Optional<java.lang.String> |
getShortName()
Gets the short name of the argument (e.g., -h).
|
public Argument(java.lang.String longName, java.lang.String shortName, Parser.Arity arity, java.lang.String help)
longName
- Long name of the argument (e.g., --help).shortName
- Short name of the argument (e.g., -h).arity
- Arity / number of times a value can be provided.help
- Help text of the argument.public java.util.Optional<java.lang.String> getShortName()
public java.util.Optional<java.lang.String> getLongName()
public java.lang.String getCanonicalName()
public Parser.Arity getArity()
public java.lang.String getHelp()