public class Option extends Object
CommandLine options and their values.| Constructor and Description |
|---|
Option(char shortName,
String longName)
Creates a new option that does not require a parameter.
|
Option(char shortName,
String longName,
boolean needsParameter)
Creates a new option.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getCounter()
Returns the counter of the option.
|
String |
getLongName()
Returns the long name of the option.
|
char |
getShortName()
Returns the short name of the option.
|
String |
getValue()
Returns the value of the option’s parameter.
|
boolean |
isPresent()
Returns whether this option was present in the command line.
|
boolean |
needsParameter()
Returns whether the option needs a parameter.
|
String |
toString() |
public Option(char shortName,
String longName)
shortName - The short name of the option (may be