public static class Presets.Preset
extends java.lang.Object
implements java.lang.Iterable<java.util.Map.Entry<java.lang.String,java.lang.String>>
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
name
The name of this preset.
|
private java.util.Map<java.lang.String,java.lang.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(java.lang.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.
|
java.util.List<java.lang.String> |
getKeys()
Get all keys in this preset.
|
java.lang.String |
getName()
Get the name of this preset.
|
java.lang.String |
getSetting(java.lang.String name)
Get the value for the setting with the specified name.
|
java.util.Iterator<java.util.Map.Entry<java.lang.String,java.lang.String>> |
iterator()
Iterate over all settings.
|
void |
setSetting(java.lang.String name,
java.lang.String value)
Set a value for the specified setting.
|
int |
size()
Get the number of settings in the preset.
|
private java.util.Map<java.lang.String,java.lang.String> settings
private java.lang.String name
private Preset()
private Preset(java.lang.String name)
private Preset(Element preset)
public java.util.Iterator<java.util.Map.Entry<java.lang.String,java.lang.String>> iterator()
iterator
in interface java.lang.Iterable<java.util.Map.Entry<java.lang.String,java.lang.String>>
private void buildDom(Element element)
element
- The parent element to add this preset topublic java.lang.String getName()
public java.lang.String getSetting(java.lang.String name)
name
- The name of the settingpublic void setSetting(java.lang.String name, java.lang.String value)
name
- The name of the settingvalue
- The value, use null to remove the settingpublic int size()
public java.util.List<java.lang.String> getKeys()