Modifier and Type | Field and Description |
---|---|
private String |
name
The name of this preset.
|
private Map<String,String> |
settings
The key-value pairs in this preset.
|
Modifier | Constructor and Description |
---|---|
private |
Preset() |
private |
Preset(Element preset)
Load preset name and key-value pairs from XML Document.
|
private |
Preset(String name) |
Modifier and Type | Method and Description |
---|---|
private void |
buildDom(Element element)
Add XML elements to the parent element for this preset's key-value
pairs.
|
List<String> |
getKeys()
Get all keys in this preset.
|
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.
|
int |
size()
Get the number of settings in the preset.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
private String name
private Preset()
private Preset(String name)
private Preset(Element preset)
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 settingpublic void setSetting(String name, String value)
name
- The name of the settingvalue
- The value, use null to remove the settingpublic int size()