public final class Parameter
extends java.lang.Object
Constructor and Description |
---|
Parameter(java.lang.String longName,
boolean hasArgument,
java.lang.String description)
Constructs a parameter.
|
Parameter(java.lang.String longName,
java.lang.String[] values,
java.lang.String description)
Constructs a parameter.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getDescription()
Returns the description of the parameter.
|
java.lang.String |
getLongName()
Returns the long name of the parameter.
|
org.apache.commons.cli.Option |
getOption()
Returns the parameter in the Apache Commons CLI format.
|
boolean |
hasArgument()
Checks whether an argument is required after the parameter.
|
boolean |
usesPredefinedValues()
Checks whether the parameter has predefined values only.
|
public Parameter(java.lang.String longName, boolean hasArgument, java.lang.String description)
longName
- the multi-character name of the parameter.hasArgument
- the flag signaling whether an argument is required after the parameter.description
- the self-documenting description of the parameter.public Parameter(java.lang.String longName, java.lang.String[] values, java.lang.String description)
longName
- the multi-character name of the parameter.values
- the predefined values of the parameter.description
- the self-documenting description of the parameter.public java.lang.String getLongName()
public boolean hasArgument()
true
if an argument is required; false
otherwise.public boolean usesPredefinedValues()
true
if predefined values are used; false
otherwise.public java.lang.String getDescription()
public org.apache.commons.cli.Option getOption()