edu.ntnu.ecosim.basicfunctionality
Class ConfigProperties

java.lang.Object
  extended by edu.ntnu.ecosim.basicfunctionality.ConfigProperties
All Implemented Interfaces:
java.io.Serializable

public class ConfigProperties
extends java.lang.Object
implements java.io.Serializable

Class holding the cached configuration properties, so they don't need to be read each time a property is accessed.

See Also:
Serialized Form

Constructor Summary
ConfigProperties()
          Constructor
 
Method Summary
 java.util.Enumeration<java.io.Serializable> elements()
          Method to access the elements of the configuration file
 java.lang.String getProperty(java.lang.String propertyName)
          Method to get a "property", that is - a property of the configuration tree
 ConfigProperties getSubModule(java.lang.String listName)
          Method to get a submodule
 java.util.Enumeration<java.lang.String> keys()
          Fetches the keys of the hashmap
 void putProperty(java.lang.String propertyName, ConfigProperties property)
          Put a submodule of properties into the configuration
 void putProperty(java.lang.String propertyName, java.lang.String propertyValue)
          Put property into configuration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigProperties

public ConfigProperties()
Constructor

Method Detail

elements

public java.util.Enumeration<java.io.Serializable> elements()
Method to access the elements of the configuration file

Returns:
The elements

getProperty

public java.lang.String getProperty(java.lang.String propertyName)
Method to get a "property", that is - a property of the configuration tree

Parameters:
propertyName - the name of the property you want to get
Returns:
The value of the property

getSubModule

public ConfigProperties getSubModule(java.lang.String listName)
Method to get a submodule

Parameters:
listName - the name of the submodule
Returns:
the submodule

keys

public java.util.Enumeration<java.lang.String> keys()
Fetches the keys of the hashmap

Returns:
Enumeration containing the keys

putProperty

public void putProperty(java.lang.String propertyName,
                        ConfigProperties property)
Put a submodule of properties into the configuration

Parameters:
propertyName - the property name
property - the properties

putProperty

public void putProperty(java.lang.String propertyName,
                        java.lang.String propertyValue)
Put property into configuration.

Parameters:
propertyName - the property name
propertyValue - the property value