org.apache.commons.configuration
public class CompositeConfiguration extends AbstractConfiguration implements Cloneable
Version: $Id: CompositeConfiguration.java 494581 2007-01-09 21:14:20Z oheger $
Field Summary | |
---|---|
List | configList List holding all the configuration |
Configuration | inMemoryConfiguration
Configuration that holds in memory stuff. |
Constructor Summary | |
---|---|
CompositeConfiguration()
Creates an empty CompositeConfiguration object which can then
be added some other Configuration files | |
CompositeConfiguration(Configuration inMemoryConfiguration)
Creates a CompositeConfiguration object with a specified in memory
configuration. | |
CompositeConfiguration(Collection configurations)
Create a CompositeConfiguration with an empty in memory configuration
and adds the collection of configurations specified.
| |
CompositeConfiguration(Configuration inMemoryConfiguration, Collection configurations)
Creates a CompositeConfiguration with a specified in memory
configuration, and then adds the given collection of configurations.
|
Method Summary | |
---|---|
void | addConfiguration(Configuration config)
Add a configuration.
|
protected void | addPropertyDirect(String key, Object token)
Add this property to the inmemory Configuration.
|
void | clear()
Remove all configuration reinitialize the in memory configuration. |
protected void | clearPropertyDirect(String key) |
Object | clone()
Returns a copy of this object. |
boolean | containsKey(String key) |
Configuration | getConfiguration(int index)
Return the configuration at the specified index.
|
Configuration | getInMemoryConfiguration()
Returns the "in memory configuration". |
Iterator | getKeys() |
Iterator | getKeys(String key) |
List | getList(String key, List defaultValue) |
int | getNumberOfConfigurations()
Return the number of configurations.
|
Object | getProperty(String key)
Read property from underlying composite
|
String[] | getStringArray(String key) |
boolean | isEmpty() |
void | removeConfiguration(Configuration config)
Remove a configuration. |
void | setDelimiterParsingDisabled(boolean delimiterParsingDisabled)
Sets a flag whether added values for string properties should be checked
for the list delimiter. |
void | setListDelimiter(char listDelimiter)
Sets the character that is used as list delimiter. |
Parameters: inMemoryConfiguration the in memory configuration to use
Parameters: configurations the collection of configurations to add
Parameters: inMemoryConfiguration the in memory configuration to use configurations the collection of configurations to add
Parameters: config the configuration to add
Parameters: key The Key to add the property to. token The Value to add.
Returns: the copy
Since: 1.3
Parameters: index The index of the configuration to retrieve
Returns: the configuration at this index
Returns: the in memory configuration
Returns: the number of configuration
Parameters: key key to use for mapping
Returns: object associated with the given configuration key.
Parameters: config The configuration to remove
Parameters: delimiterParsingDisabled the new value of the flag
Since: 1.4
Parameters: listDelimiter the new list delimiter character
Since: 1.4