|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface Settings
This interface provides read and write access to settings.
The structure is, that there is a category with any number of
key/value pairs inside.
A key is unique in one category but may occur several times in
different categories.
If a category of null is passed to any method, the default category
will be taken instead.
A SettingsWriter must treat the default category as not existent and write
all its key/value pairs directly without any category. The default
category can be recognized by its empty name ("").
Apart from the interface each implementing class must provide a public default constructor so that instance creation with newInstance() is possible !
| Method Summary | |
|---|---|
void |
removeCategory(java.lang.String categoryName)
Removes the category with the specified name and all its key/value pairs. |
void |
removeDefaultCategory()
Removes the default category and all its key/value pairs. |
void |
removeKey(java.lang.String keyName)
Removes the key and its associated value from the default category. |
void |
removeKey(java.lang.String categoryName,
java.lang.String keyName)
Removes the key and its associated value from the specified category. |
void |
setValueOf(java.lang.String keyName,
java.lang.String value)
Sets the value of given key in the default category. |
void |
setValueOf(java.lang.String categoryName,
java.lang.String keyName,
java.lang.String value)
Sets the value of given key in the specified category. |
| Methods inherited from interface org.pf.settings.ReadOnlySettings |
|---|
getCategoryNames, getDefaults, getKeyNamesOf, getKeyNamesOfDefaultCategory, getName, getSettingsNameOf, getSettingsNameOf, getValueOf, getValueOf, setDefaults, setName |
| Method Detail |
|---|
void setValueOf(java.lang.String categoryName,
java.lang.String keyName,
java.lang.String value)
categoryName - The name of the category (null means the default category)keyName - The name of the key the value should be assigned to.value - The value to be assigned to the key
void setValueOf(java.lang.String keyName,
java.lang.String value)
keyName - The name of the key the value should be assigned to.value - The value to be assigned to the key
void removeKey(java.lang.String categoryName,
java.lang.String keyName)
categoryName - The name of the category the key should be removed fromkeyName - The name of the key to removevoid removeKey(java.lang.String keyName)
keyName - The name of the key to removevoid removeCategory(java.lang.String categoryName)
categoryName - The name of the category to removedvoid removeDefaultCategory()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||