|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.commons.configuration.event.EventSource
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.
| Field Summary |
| Fields inherited from class org.apache.commons.configuration.AbstractConfiguration |
END_TOKEN, EVENT_ADD_PROPERTY, EVENT_CLEAR, EVENT_CLEAR_PROPERTY, EVENT_READ_PROPERTY, EVENT_SET_PROPERTY, START_TOKEN |
| Constructor Summary | |
BaseConfiguration()
|
|
| Method Summary | |
protected void |
addPropertyDirect(String key,
Object value)
Adds a key/value pair to the map. |
void |
clear()
Remove all properties from the configuration. |
protected void |
clearPropertyDirect(String key)
Clear a property in the configuration. |
Object |
clone()
Creates a copy of this object. |
boolean |
containsKey(String key)
check if the configuration contains the key |
Iterator |
getKeys()
Get the list of the keys contained in the configuration repository. |
Object |
getProperty(String key)
Read property from underlying map. |
boolean |
isEmpty()
Check if the configuration is empty |
| Methods inherited from class org.apache.commons.configuration.event.EventSource |
addConfigurationListener, addErrorListener, clearConfigurationListeners, clearErrorListeners, createErrorEvent, createEvent, fireError, fireEvent, getConfigurationListeners, getErrorListeners, isDetailEvents, removeConfigurationListener, removeErrorListener, setDetailEvents |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public BaseConfiguration()
| Method Detail |
protected void addPropertyDirect(String key,
Object value)
addPropertyDirect in class AbstractConfigurationkey - key to use for mappingvalue - object to storepublic Object getProperty(String key)
getProperty in interface Configurationkey - key to use for mapping
public boolean isEmpty()
isEmpty in interface Configurationtrue if Configuration is empty,
false otherwise.public boolean containsKey(String key)
containsKey in interface Configurationkey - the configuration key
true if Configuration contain given key,
false otherwise.protected void clearPropertyDirect(String key)
clearPropertyDirect in class AbstractConfigurationkey - the key to remove along with corresponding value.public void clear()
Configuration
clear in interface Configurationclear in class AbstractConfigurationpublic Iterator getKeys()
getKeys in interface Configurationpublic Object clone()
clone in class EventSource
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||