|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.util.Dictionary<K,V>
java.util.Hashtable
NOS.io.Settings
public class Settings
| Constructor Summary | |
|---|---|
Settings()
Creates a new Settings object. |
|
Settings(java.io.InputStream in,
char divider,
boolean ignoreCase,
boolean removeQuotesFromValues)
Creates a new Settings object. |
|
Settings(NOSFile file)
Creates a new Settings object. |
|
Settings(java.lang.String filenm)
Creates a new Settings object. |
|
Settings(java.lang.String filenm,
char divider,
boolean ignoreCase,
boolean removeQuotesFromValues)
Creates a new Settings object. |
|
| Method Summary | |
|---|---|
void |
commitChanges()
Forces a save to disk. |
boolean |
readBool(java.lang.String key,
boolean def)
Retrieve a boolean value from the store. |
int |
readColour(java.lang.String key,
int def)
Retrieve a hex integer value from the store. |
double |
readDouble(java.lang.String key,
double def)
Retrieve a double value from the store. |
float |
readFloat(java.lang.String key,
float def)
Retrieve a float value from the store. |
int |
readInt(java.lang.String key,
int def)
Retrieve a integer value from the store. |
java.lang.String |
readString(java.lang.String key,
java.lang.String def)
Retrieve a string value from the store. |
void |
refresh()
Forces a re-read of the settings from storage. |
java.lang.String |
toString()
Returns a string representation of this Settings store. |
void |
writeValue(java.lang.String key,
java.lang.String value)
Change/Add a value in/to the store. |
void |
writeValues(java.util.Hashtable values)
Change/Add values in/to the store from all entries in the Hashtable. |
| Methods inherited from class java.util.Hashtable |
|---|
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, values |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Settings()
public Settings(NOSFile file)
file - The NOSFile object to read from.public Settings(java.lang.String filenm)
filenm - The name of the file to associate with this group of
settings.
public Settings(java.io.InputStream in,
char divider,
boolean ignoreCase,
boolean removeQuotesFromValues)
in - An InputStream to read settings fromdivider - A divider char to useignoreCase - If true then the case of keys will be ignoredremoveQuotesFromValues - Remove '!' quotes from settings file values
public Settings(java.lang.String filenm,
char divider,
boolean ignoreCase,
boolean removeQuotesFromValues)
filenm - The name of the file to associate with this group of
settings.divider - The divider to use between labels and values.ignoreCase - If true then the case of keys will be ignoredremoveQuotesFromValues - Remove '!' quotes from settings file values| Method Detail |
|---|
public void refresh()
public void commitChanges()
public java.lang.String readString(java.lang.String key,
java.lang.String def)
key - Identifing label.def - Default value, returned if no value can be found.
public int readColour(java.lang.String key,
int def)
key - Identifing label.def - Default value, returned if no value can be found.
public int readInt(java.lang.String key,
int def)
key - Identifing label.def - Default value, returned if no value can be found.
public double readDouble(java.lang.String key,
double def)
key - Identifing label.def - Default value, returned if no value can be found.
public float readFloat(java.lang.String key,
float def)
key - Identifing label.def - Default value, returned if no value can be found.
public boolean readBool(java.lang.String key,
boolean def)
key - Identifing label.def - Default value, returned if no value can be found.
public void writeValue(java.lang.String key,
java.lang.String value)
key - Identifing label.value - Corresponding value.public void writeValues(java.util.Hashtable values)
values - A Hashtable of values.public java.lang.String toString()
toString in class java.util.Hashtable
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||