de.grogra.util
public final class ConfigurationSet extends java.lang.Object implements ModifiableMap
ConfigurationSet is a ModifiableMap
and consists of a set of Configurations.
The map associations are the union of the associations of the
individual configurations.ModifiableMap.ProducerDEFAULT_VALUE, EMPTY_MAP| Constructor and Description |
|---|
ConfigurationSet(java.lang.String name)
Creates a new configuration set with the given
name. |
| Modifier and Type | Method and Description |
|---|---|
void |
add(Configurable c)
Adds the configurations of
c to this set by invoking
Configurable.addConfigurations(ConfigurationSet) on
c. |
void |
add(Configuration c)
Adds
c to this set. |
java.lang.Object |
get(java.lang.Object key,
java.lang.Object defaultValue)
Returns the value associated with
key. |
KeyDescription[] |
getKeyDescriptions()
Returns the union of the
KeyDescriptions of the
contained configurations. |
java.lang.String |
getName()
Returns the name of this set.
|
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value)
Maps
key to value. |
int |
size()
Returns the number of configurations.
|
void |
writeBack() |
public ConfigurationSet(java.lang.String name)
name.name - the name for this setpublic void add(Configurable c)
c to this set by invoking
Configurable.addConfigurations(ConfigurationSet) on
c. If this method is invoke more than once with the same
c, only the first invocation has an effect.c - a configurable objectpublic void add(Configuration c)
c to this set.c - the configuration to be addedpublic java.lang.Object get(java.lang.Object key,
java.lang.Object defaultValue)
Mapkey. If there is
no value associated with key, defaultValue
is returned.public KeyDescription[] getKeyDescriptions()
KeyDescriptions of the
contained configurations.public java.lang.String getName()
public java.lang.Object put(java.lang.Object key,
java.lang.Object value)
ModifiableMapkey to value. Following invocations
of the get-method with key as key will
return value.put in interface ModifiableMapkey - a keyvalue - the value to be associated with keynullpublic int size()
public void writeBack()