Class EstimationProperties
java.lang.Object
|
+----EstimationProperties
- public class EstimationProperties
- extends Object
This singleton class holds properties that are used in the estimation
process. The properies are initially read from the file properties.dat,
but default values are also provided in case the file is corrupted.
The class has methods for storing and retrieving properties, and to save
them to file. Only one instance of the class can exist. This instance is
accessed through the getInstance method.
- Author:
- Vegard Brox
-
getInstance()
- This method should be used to access the only instance of this class.
-
getProperty(String)
- Retrieves a property from the property list.
-
saveProperties()
- Saves the current properties to file.
-
setProperty(String, int)
- Stores a new value for a property in the list.
getInstance
public static EstimationProperties getInstance()
- This method should be used to access the only instance of this class.
The method creates the instance if necessary, then returns it.
- Returns:
- The instance of this class
getProperty
public int getProperty(String property)
- Retrieves a property from the property list.
- Parameters:
- property - The property to retrieve
- Returns:
- The value of the property
setProperty
public void setProperty(String property,
int value)
- Stores a new value for a property in the list.
- Parameters:
- property - The property to store a new value for
- value - The new value to store
saveProperties
public void saveProperties()
- Saves the current properties to file.