gnu.text
public class Options extends Object
Field Summary | |
---|---|
static int | BOOLEAN_OPTION Bit indicating option value is a boolean. |
static int | STRING_OPTION |
static String | UNKNOWN |
Constructor Summary | |
---|---|
Options() | |
Options(Options previous) |
Method Summary | |
---|---|
void | add(String key, int kind, String documentation) Create a new option and enters it in this table.
|
Object | get(String key, Object defaultValue) Get the value for the option.
|
boolean | getBoolean(String key) |
boolean | getBoolean(String key, boolean defaultValue) |
String | getDoc(String key) |
OptionInfo | getInfo(String key) |
Object | getLocal(String key) Get current option value.
|
Vector | keys() Return the list of option keys. |
void | popOptionValues(Vector options) Restore a list of options, as set by pushOptionValues |
void | pushOptionValues(Vector options) Set a list of options, remember the old value. |
void | reset(String key, Object oldValue) Reset the value of a named option. |
void | set(String key, Object value) Set the value of a named option. |
void | set(String key, Object value, SourceMessages messages) Set the value of a named option. |
String | set(String key, String argument) Set the value of the key to the argument, appropriate parsed.
return null on success or a String error message.
|
Parameters: key the options name (key). kind type and other flag bits of the option. documentation a String describing what the option does.
Parameters: options is vector of triples, echo of which is consisting of: a String option key; an entry whose valus is ignores and is used to store the old value; and a new value for the options.