|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.configuration.AbstractConfiguration
org.apache.commons.configuration.MapConfiguration
A Map based Configuration.
Field Summary | |
protected Map |
map
The Map decorated by this configuration. |
Fields inherited from class org.apache.commons.configuration.AbstractConfiguration |
END_TOKEN, START_TOKEN |
Constructor Summary | |
MapConfiguration(Map map)
Create a Configuration decorator around the specified Map. |
Method Summary | |
protected void |
addPropertyDirect(String key,
Object value)
Adds a key/value pair to the Configuration. |
void |
clearProperty(String key)
Remove a property from the configuration. |
boolean |
containsKey(String key)
Check if the configuration contains the specified key. |
Iterator |
getKeys()
Get the list of the keys contained in the configuration. The returned iterator can be used to obtain all defined keys. Note that the exact behavior of the iterator's remove() method is specific to
a concrete implementation. It may remove the corresponding
property from the configuration, but this is not guaranteed. In any case
it is no replacement for calling
for this property. So it is
highly recommended to avoid using the iterator's remove()
method. |
Map |
getMap()
Return the Map decorated by this configuration. |
Object |
getProperty(String key)
Gets a property from the configuration. |
boolean |
isEmpty()
Check if the configuration is empty. |
Methods inherited from class org.apache.commons.configuration.AbstractConfiguration |
addProperty, clear, getBigDecimal, getBigDecimal, getBigInteger, getBigInteger, getBoolean, getBoolean, getBoolean, getByte, getByte, getByte, getDelimiter, getDouble, getDouble, getDouble, getFloat, getFloat, getFloat, getInt, getInt, getInteger, getKeys, getList, getList, getLong, getLong, getLong, getProperties, getProperties, getShort, getShort, getShort, getString, getString, getStringArray, interpolate, interpolate, interpolateHelper, isThrowExceptionOnMissing, resolveContainerStore, setDelimiter, setProperty, setThrowExceptionOnMissing, subset |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected Map map
Constructor Detail |
public MapConfiguration(Map map)
map
- the mapMethod Detail |
public Map getMap()
public Object getProperty(String key)
Configuration
key
- property to retrieve
protected void addPropertyDirect(String key, Object value)
AbstractConfiguration
addPropertyDirect
in class AbstractConfiguration
key
- key to use for mappingvalue
- object to storepublic boolean isEmpty()
AbstractConfiguration
isEmpty
in interface Configuration
isEmpty
in class AbstractConfiguration
public boolean containsKey(String key)
AbstractConfiguration
containsKey
in interface Configuration
containsKey
in class AbstractConfiguration
public void clearProperty(String key)
AbstractConfiguration
clearProperty
in interface Configuration
clearProperty
in class AbstractConfiguration
public Iterator getKeys()
AbstractConfiguration
remove()
method is specific to
a concrete implementation. It may remove the corresponding
property from the configuration, but this is not guaranteed. In any case
it is no replacement for calling
Configuration.clearProperty(String)
for this property. So it is
highly recommended to avoid using the iterator's remove()
method.
getKeys
in interface Configuration
getKeys
in class AbstractConfiguration
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |