org.apache.commons.configuration

Class MapConfiguration

public class MapConfiguration extends AbstractConfiguration implements Cloneable

A Map based Configuration.

Since: 1.1

Version: $Revision: 515306 $, $Date: 2007-03-06 22:15:00 +0100 (Di, 06 Mrz 2007) $

Author: Emmanuel Bourg

Field Summary
protected Mapmap
The Map decorated by this configuration.
Constructor Summary
MapConfiguration(Map map)
Create a Configuration decorator around the specified Map.
Method Summary
protected voidaddPropertyDirect(String key, Object value)
protected voidclearPropertyDirect(String key)
Objectclone()
Returns a copy of this object.
booleancontainsKey(String key)
IteratorgetKeys()
MapgetMap()
Return the Map decorated by this configuration.
ObjectgetProperty(String key)
booleanisEmpty()

Field Detail

map

protected Map map
The Map decorated by this configuration.

Constructor Detail

MapConfiguration

public MapConfiguration(Map map)
Create a Configuration decorator around the specified Map. The map is used to store the configuration properties, any change will also affect the Map.

Parameters: map the map

Method Detail

addPropertyDirect

protected void addPropertyDirect(String key, Object value)

clearPropertyDirect

protected void clearPropertyDirect(String key)

clone

public Object clone()
Returns a copy of this object. The returned configuration will contain the same properties as the original. Event listeners are not cloned.

Returns: the copy

Since: 1.3

containsKey

public boolean containsKey(String key)

getKeys

public Iterator getKeys()

getMap

public Map getMap()
Return the Map decorated by this configuration.

Returns: the map this configuration is based onto

getProperty

public Object getProperty(String key)

isEmpty

public boolean isEmpty()