|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.configuration.AbstractConfiguration org.apache.commons.configuration.BaseConfiguration
Basic configuration classe. Stores the configuration data but does not provide any load or save functions. If you want to load your Configuration from a file use PropertiesConfiguration or XmlConfiguration. This class extends normal Java properties by adding the possibility to use the same key many times concatenating the value strings instead of overwriting them.
Nested Class Summary |
Nested classes inherited from class org.apache.commons.configuration.AbstractConfiguration |
AbstractConfiguration.PropertiesTokenizer |
Field Summary |
Fields inherited from class org.apache.commons.configuration.AbstractConfiguration |
END_TOKEN, START_TOKEN |
Constructor Summary | |
BaseConfiguration()
Empty constructor. |
Method Summary | |
protected void |
addPropertyDirect(String key,
Object obj)
Adds a key/value pair to the map. |
void |
clearProperty(String key)
Clear a property in the configuration. |
boolean |
containsKey(String key)
check if the configuration contains the key |
Iterator |
getKeys()
Get the list of the keys contained in the configuration repository. |
protected Object |
getPropertyDirect(String key)
Read property from underlying map. |
boolean |
isEmpty()
Check if the configuration is empty |
Methods inherited from class org.apache.commons.configuration.AbstractConfiguration |
addProperty, 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, getProperty, getShort, getShort, getShort, getString, getString, getStringArray, getVector, getVector, interpolate, interpolateHelper, isThrowExceptionOnMissing, setDelimiter, setProperty, setThrowExceptionOnMissing, split, subset |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public BaseConfiguration()
Method Detail |
protected void addPropertyDirect(String key, Object obj)
addPropertyDirect
in class AbstractConfiguration
key
- key to use for mappingobj
- object to storeprotected Object getPropertyDirect(String key)
getPropertyDirect
in class AbstractConfiguration
key
- key to use for mapping
public boolean isEmpty()
isEmpty
in interface Configuration
isEmpty
in class AbstractConfiguration
true
if Configuration is empty,
false
otherwise.public boolean containsKey(String key)
containsKey
in interface Configuration
containsKey
in class AbstractConfiguration
key
- the configuration key
true
if Configuration contain given key,
false
otherwise.public void clearProperty(String key)
clearProperty
in interface Configuration
clearProperty
in class AbstractConfiguration
key
- the key to remove along with corresponding value.public Iterator getKeys()
getKeys
in interface Configuration
getKeys
in class AbstractConfiguration
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |