public class Options
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Options.OptionInfo |
Modifier and Type | Field and Description |
---|---|
static int |
BOOLEAN_OPTION
Bit indicating option value is a boolean.
|
static int |
INT_OPTION |
static int |
STRING_OPTION |
static java.lang.String |
UNKNOWN |
Modifier and Type | Method and Description |
---|---|
Options.OptionInfo |
add(java.lang.String key,
int kind,
java.lang.Object defaultValue,
java.lang.String documentation) |
Options.OptionInfo |
add(java.lang.String key,
int kind,
java.lang.String documentation)
Create a new option and enters it in this table.
|
static java.lang.Boolean |
booleanValue(java.lang.String argument) |
java.lang.Object |
get(Options.OptionInfo key) |
java.lang.Object |
get(Options.OptionInfo key,
java.lang.Object defaultValue) |
java.lang.Object |
get(java.lang.String key,
java.lang.Object defaultValue)
Get the value for the option.
|
boolean |
getBoolean(Options.OptionInfo key) |
boolean |
getBoolean(Options.OptionInfo key,
boolean defaultValue) |
boolean |
getBoolean(java.lang.String key) |
boolean |
getBoolean(java.lang.String key,
boolean defaultValue) |
java.lang.String |
getDoc(java.lang.String key) |
Options.OptionInfo |
getInfo(java.lang.String key) |
int |
getInt(Options.OptionInfo key,
int defaultValue) |
java.lang.Object |
getLocal(java.lang.String key)
Get current option value.
|
java.util.ArrayList<java.lang.String> |
keys()
Return the list of option keys.
|
void |
popOptionValues(java.util.Vector options)
Restore a list of options, as set by pushOptionValues
|
void |
pushOptionValues(java.util.Vector options)
Set a list of options, remember the old value.
|
void |
reset(java.lang.String key,
java.lang.Object oldValue)
Reset the value of a named option.
|
void |
set(java.lang.String key,
java.lang.Object value)
Set the value of a named option.
|
java.lang.Object |
set(java.lang.String key,
java.lang.Object value,
SourceMessages messages)
Set the value of a named option.
|
java.lang.String |
set(java.lang.String key,
java.lang.String argument)
Set the value of the key to the argument, appropriate parsed.
|
public static final int BOOLEAN_OPTION
public static final int STRING_OPTION
public static final int INT_OPTION
public static final java.lang.String UNKNOWN
public Options()
public Options(Options previous)
public Options.OptionInfo add(java.lang.String key, int kind, java.lang.String documentation)
key
- the options name (key).kind
- type and other flag bits of the option.documentation
- a String describing what the option does.public Options.OptionInfo add(java.lang.String key, int kind, java.lang.Object defaultValue, java.lang.String documentation)
public static java.lang.Boolean booleanValue(java.lang.String argument)
public void set(java.lang.String key, java.lang.Object value)
public java.lang.Object set(java.lang.String key, java.lang.Object value, SourceMessages messages)
public void reset(java.lang.String key, java.lang.Object oldValue)
public java.lang.String set(java.lang.String key, java.lang.String argument)
public Options.OptionInfo getInfo(java.lang.String key)
public java.lang.Object get(java.lang.String key, java.lang.Object defaultValue)
public java.lang.Object get(Options.OptionInfo key, java.lang.Object defaultValue)
public java.lang.Object get(Options.OptionInfo key)
public java.lang.Object getLocal(java.lang.String key)
public boolean getBoolean(java.lang.String key)
public boolean getBoolean(java.lang.String key, boolean defaultValue)
public boolean getBoolean(Options.OptionInfo key, boolean defaultValue)
public boolean getBoolean(Options.OptionInfo key)
public int getInt(Options.OptionInfo key, int defaultValue)
public void pushOptionValues(java.util.Vector options)
options
- is vector of triples, echo of which is consisting of:
a String option key;
an entry whose value is ignored and is used to store the old value; and
a new value for the option.public void popOptionValues(java.util.Vector options)
public java.util.ArrayList<java.lang.String> keys()
public java.lang.String getDoc(java.lang.String key)