|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object gnu.text.Options
public class Options
Mananges a table of named options, Can inherit from another table of "default" options.
Field Summary | |
---|---|
static int |
BOOLEAN_OPTION
Bit indicating option value is a boolean. |
static int |
STRING_OPTION
|
static java.lang.String |
UNKNOWN
|
Constructor Summary | |
---|---|
Options()
|
|
Options(Options previous)
|
Method Summary | |
---|---|
void |
add(java.lang.String key,
int kind,
java.lang.String documentation)
Create a new option and enters it in this table. |
java.lang.Object |
get(java.lang.String key,
java.lang.Object defaultValue)
Get the value for the option. |
boolean |
getBoolean(java.lang.String key)
|
boolean |
getBoolean(java.lang.String key,
boolean defaultValue)
|
java.lang.String |
getDoc(java.lang.String key)
|
gnu.text.OptionInfo |
getInfo(java.lang.String key)
|
java.lang.Object |
getLocal(java.lang.String key)
Get current option value. |
java.util.Vector |
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. |
void |
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int BOOLEAN_OPTION
public static final int STRING_OPTION
public static final java.lang.String UNKNOWN
Constructor Detail |
---|
public Options()
public Options(Options previous)
Method Detail |
---|
public void 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 void set(java.lang.String key, java.lang.Object value)
public void 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 gnu.text.OptionInfo getInfo(java.lang.String key)
public java.lang.Object get(java.lang.String key, java.lang.Object defaultValue)
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 void pushOptionValues(java.util.Vector options)
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.public void popOptionValues(java.util.Vector options)
public java.util.Vector keys()
public java.lang.String getDoc(java.lang.String key)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |