org.incava.jagol
Class ListOption
public
class
ListOption
extends Option
Represents a list of objects that comprise this option.
Method Summary |
protected Object | convert(String str)
Returns the string, possibly converted to a different Object type.
|
List | getValue()
Returns the value. |
protected void | parse(String str)
Parses the value into the value list. |
boolean | set(String arg, List args)
Sets from a list of command-line arguments. |
void | setValue(List value)
Sets the value. |
void | setValue(String value)
Sets the value from the string, for a list type. |
String | toString() |
public ListOption(String longName, String description)
Creates the option.
public ListOption(String longName, String description, List value)
Creates the option, with a default list.
protected Object convert(String str)
Returns the string, possibly converted to a different Object type.
Subclasses can convert the string to their own data type.
public List getValue()
Returns the value. This is empty by default.
protected void parse(String str)
Parses the value into the value list. If subclasses want to convert the
string to their own data type, override the
convert
method.
See Also: convert
public boolean set(String arg, List args)
Sets from a list of command-line arguments. Returns whether this option
could be set from the current head of the list. Assumes whitespace or
comma delimiter.
public void setValue(List value)
Sets the value.
public void setValue(String value)
Sets the value from the string, for a list type. Assumes whitespace or
comma delimiter
public String toString()