|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.basedb.core.Presets.Preset
public static class Presets.Preset
Represents a single preset. A preset contains any number of key-value pairs (string). A named preset has a non-null name.
Field Summary | |
---|---|
private String |
name
The name of this preset. |
private Map<String,String> |
settings
The key-value pairs in this preset. |
Constructor Summary | |
---|---|
private |
Presets.Preset()
|
private |
Presets.Preset(Element preset)
Load preset name and key-value pairs from XML Document. |
private |
Presets.Preset(String name)
|
Method Summary | |
---|---|
private void |
buildDom(Element element)
Add XML elements to the parent element for this preset's key-value pairs. |
String |
getName()
Get the name of this preset. |
String |
getSetting(String name)
Get the value for the setting with the specified name. |
Iterator<Map.Entry<String,String>> |
iterator()
Iterate over all settings. |
void |
setSetting(String name,
String value)
Set a value for the specified setting. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private Map<String,String> settings
private String name
Constructor Detail |
---|
private Presets.Preset()
private Presets.Preset(String name)
private Presets.Preset(Element preset)
preset
- Method Detail |
---|
public Iterator<Map.Entry<String,String>> iterator()
iterator
in interface Iterable<Map.Entry<String,String>>
private void buildDom(Element element)
element
- The parent element to add this preset topublic String getName()
public String getSetting(String name)
name
- The name of the setting
public void setSetting(String name, String value)
name
- The name of the settingvalue
- The value, use null to remove the setting
|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |