|
||||||||||
| 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.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.Container, AbstractConfiguration.PropertiesTokenizer |
| Field Summary | |
private org.apache.commons.collections.SequencedHashMap |
store
stores the configuration key-value pairs |
| Fields inherited from class org.apache.commons.configuration.AbstractConfiguration |
defaults, END_TOKEN, START_TOKEN |
| Constructor Summary | |
BaseConfiguration()
Empty constructor. |
|
BaseConfiguration(Configuration defaults)
Creates an empty BaseConfiguration object with a Super-Object which is queries for every key. |
|
| Method Summary | |
protected void |
addPropertyDirect(java.lang.String key,
java.lang.Object obj)
Adds a key/value pair to the map. |
void |
clearProperty(java.lang.String key)
Clear a property in the configuration. |
boolean |
containsKey(java.lang.String key)
check if the configuration contains the key |
java.util.Iterator |
getKeys()
Get the list of the keys contained in the configuration repository. |
protected java.lang.Object |
getPropertyDirect(java.lang.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, getBoolean, getBoolean, getBoolean, getByte, getByte, getByte, getDouble, getDouble, getDouble, getFloat, getFloat, getFloat, getInt, getInt, getInteger, getKeys, getList, getList, getLong, getLong, getLong, getProperties, getProperties, getProperty, getShort, getShort, getShort, getString, getString, getStringArray, interpolate, interpolateHelper, processString, setProperty, subset, testBoolean |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private org.apache.commons.collections.SequencedHashMap store
| Constructor Detail |
public BaseConfiguration()
public BaseConfiguration(Configuration defaults)
defaults - Configuration defaults to use if key not in file| Method Detail |
protected void addPropertyDirect(java.lang.String key,
java.lang.Object obj)
addPropertyDirect in class AbstractConfigurationkey - key to use for mappingobj - object to storeprotected java.lang.Object getPropertyDirect(java.lang.String key)
getPropertyDirect in class AbstractConfigurationkey - key to use for mapping
public boolean isEmpty()
isEmpty in interface ConfigurationisEmpty in class AbstractConfigurationtrue if Configuration is empty,
false otherwise.public boolean containsKey(java.lang.String key)
containsKey in interface ConfigurationcontainsKey in class AbstractConfigurationkey - the configuration key
true if Configuration contain given key,
false otherwise.public void clearProperty(java.lang.String key)
clearProperty in interface ConfigurationclearProperty in class AbstractConfigurationkey - the key to remove along with corresponding value.public java.util.Iterator getKeys()
getKeys in interface ConfigurationgetKeys in class AbstractConfiguration
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||