avrora.util
Class Option.List
java.lang.Object
avrora.util.Option
avrora.util.Option.List
- Enclosing class:
- Option
- public static class Option.List
- extends Option
The Option.List class is an implementation of the
Option class that encapsulates a list.
|
Field Summary |
protected java.lang.String |
orig
|
protected java.util.List |
value
|
|
Constructor Summary |
Option.List(java.lang.String nm,
java.lang.String val,
java.lang.String desc)
The constructor for the Option.List class creates a new option
that can store a list of strings. |
|
Method Summary |
java.util.List |
get()
The get() method returns the current value of the option. |
void |
printHelp()
The printHelp() method prints out a textual paragraph of the
help item for this option to the terminal. |
void |
set(java.lang.String val)
The set() method updates the value of the option. |
java.lang.String |
stringValue()
The stringValue() method returns a string representation of
the value of the option. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
value
protected java.util.List value
orig
protected java.lang.String orig
Option.List
public Option.List(java.lang.String nm,
java.lang.String val,
java.lang.String desc)
- The constructor for the
Option.List class creates a new option
that can store a list of strings. It is given an option name, a help description,
and a default value.
- Parameters:
nm - the string name of the optionval - the default value of the optiondesc - the description of the option
set
public void set(java.lang.String val)
- The
set() method updates the value of the option.
- Specified by:
set in class Option
- Parameters:
val - a string representation of the new value of the option.
get
public java.util.List get()
- The
get() method returns the current value of the option.
- Returns:
- the value of the option as a
java.util.List.
stringValue
public java.lang.String stringValue()
- The
stringValue() method returns a string representation of
the value of the option. This is used in debugging and reporting purposes.
- Specified by:
stringValue in class Option
- Returns:
- a string representation of the value of the option.
printHelp
public void printHelp()
- The
printHelp() method prints out a textual paragraph of the
help item for this option to the terminal.
- Specified by:
printHelp in class Option