Method Summary |
|
public boolean | addValue(String value) This method is not intended to be used. |
void | addValueForProcessing(String value) Adds the specified value to this Option. |
void | clearValues() Clear the Option values. |
public Object | clone() A rather odd clone method - due to incorrect code in 1.0 it is public
and in 1.1 rather than throwing a CloneNotSupportedException it throws
a RuntimeException so as to maintain backwards compat at the API level. |
public boolean | equals(Object o) |
public String | getArgName() Gets the display name for the argument value. |
public int | getArgs() Returns the number of argument values this Option can take. |
public String | getDescription() |
public int | getId() Returns the id of this Option. |
String | getKey() Returns the 'unique' Option identifier. |
public String | getLongOpt() Retrieve the long name of this Option. |
public String | getOpt() Retrieve the name of this Option. |
public Object | getType() Retrieve the type of this Option. |
public String | getValue() Returns the specified value of this Option or
null if there is no value. |
public String | getValue(int index) Returns the specified value of this Option or
null if there is no value.
Parameters: index - The index of the value to be returned. |
public String | getValue(String defaultValue) Returns the value/first value of this Option or the
defaultValue if there is no value.
Parameters: defaultValue - The value to be returned if theris no value. |
public char | getValueSeparator() Returns the value separator character. |
public String[] | getValues() |
public java.util.List | getValuesList() |
public boolean | hasArg() |
public boolean | hasArgName() Returns whether the display name for the argument value
has been set. |
public boolean | hasArgs() Query to see if this Option can take many values. |
public boolean | hasLongOpt() |
public boolean | hasOptionalArg() |
public boolean | hasValueSeparator() Return whether this Option has specified a value separator. |
public int | hashCode() |
public boolean | isRequired() |
public void | setArgName(String argName) Sets the display name for the argument value. |
public void | setArgs(int num) Sets the number of argument values this Option can take. |
public void | setDescription(String description) |
public void | setLongOpt(String longOpt) Sets the long name of this Option. |
public void | setOptionalArg(boolean optionalArg) Sets whether this Option can have an optional argument. |
public void | setRequired(boolean required) Sets whether this Option is mandatory. |
public void | setType(Object type) Sets the type of this Option. |
public void | setValueSeparator(char sep) Sets the value separator. |
public String | toString() Dump state, suitable for debugging. |