public class Option extends gnu.getopt.LongOpt implements Comparable<Option>
Modifier and Type | Field and Description |
---|---|
protected String |
argumentValue |
Constructor and Description |
---|
Option(String _name,
int _has_arg)
Constructs an Option.
|
Modifier and Type | Method and Description |
---|---|
void |
addOccurence(String _argumentValue)
Adds an actual occurence of this formal option.
|
void |
apply()
Applies the option.
|
String |
argumentValue()
The value of the option argument from the last actual occurence of this option.
|
int |
compareTo(Option other)
Compares based on name.
|
boolean |
equals(Object o)
Compares based on name.
|
int |
hashCode() |
boolean |
hasOccured()
True iff this option has actually occured.
|
int |
occurenceCount()
The number of times this option has actually occured.
|
String |
toString()
The name of this option.
|
protected String argumentValue
public final void addOccurence(String _argumentValue)
_argumentValue
- the value of any argument that accompanies the
occurence.public void apply()
public String argumentValue()
public boolean hasOccured()
public int occurenceCount()
public int compareTo(Option other)
compareTo
in interface Comparable<Option>
LongOpt.getName()