org.incava.jagol
Class ListOption
Represents a list of objects that comprise this option.
ListOption(String longName, String description) - Creates the option.
|
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.
|
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()
|
ListOption
public ListOption(String longName,
String description)
Creates the option.
ListOption
public ListOption(String longName,
String description,
List value)
Creates the option, with a default list.
convert
protected Object convert(String str)
throws InvalidTypeException
Returns the string, possibly converted to a different Object type.
Subclasses can convert the string to their own data type.
getValue
public List getValue()
Returns the value. This is empty by default.
parse
protected void parse(String str)
throws InvalidTypeException
Parses the value into the value list. If subclasses want to convert the
string to their own data type, override the convert
method.
set
public boolean set(String arg,
List args)
throws OptionException
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.
- set in interface Option
setValue
public void setValue(List value)
Sets the value.
setValue
public void setValue(String value)
throws InvalidTypeException
Sets the value from the string, for a list type. Assumes whitespace or
comma delimiter
- setValue in interface Option
toString
public String toString()