java.lang.Object
de.grogra.util.ConfigurationSet
- All Implemented Interfaces:
Map,ModifiableMap
A
ConfigurationSet is a ModifiableMap
and consists of a set of Configurations.
The map associations are the union of the associations of the
individual configurations.- Author:
- Ole Kniemeyer
-
Nested Class Summary
Nested classes/interfaces inherited from interface de.grogra.util.ModifiableMap
ModifiableMap.Producer -
Field Summary
Fields inherited from interface de.grogra.util.Map
DEFAULT_VALUE, EMPTY_MAP -
Constructor Summary
ConstructorsConstructorDescriptionConfigurationSet(String name) Creates a new configuration set with the givenname. -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(Configurable c) Adds the configurations ofcto this set by invokingConfigurable.addConfigurations(ConfigurationSet)onc.voidadd(Configuration c) Addscto this set.Returns the value associated withkey.Returns the union of theKeyDescriptions of the contained configurations.getName()Returns the name of this set.Mapskeytovalue.intsize()Returns the number of configurations.void
-
Constructor Details
-
ConfigurationSet
Creates a new configuration set with the givenname.- Parameters:
name- the name for this set
-
-
Method Details
-
add
Addscto this set.- Parameters:
c- the configuration to be added
-
add
Adds the configurations ofcto this set by invokingConfigurable.addConfigurations(ConfigurationSet)onc. If this method is invoke more than once with the samec, only the first invocation has an effect.- Parameters:
c- a configurable object
-
size
public int size()Returns the number of configurations.- Returns:
- number of configurations
-
put
Description copied from interface:ModifiableMapMapskeytovalue. Following invocations of theget-method withkeyas key will returnvalue.- Specified by:
putin interfaceModifiableMap- Parameters:
key- a keyvalue- the value to be associated withkey- Returns:
- the previously associated value, or
null
-
get
Description copied from interface:MapReturns the value associated withkey. If there is no value associated withkey,defaultValueis returned. -
writeBack
public void writeBack() -
getKeyDescriptions
Returns the union of theKeyDescriptions of the contained configurations.- Returns:
- the descriptions for all keys of this set
-
getName
Returns the name of this set.- Returns:
- the name
-