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

Method Index

 o getInstance()
This method should be used to access the only instance of this class.
 o getProperty(String)
Retrieves a property from the property list.
 o saveProperties()
Saves the current properties to file.
 o setProperty(String, int)
Stores a new value for a property in the list.

Methods

 o 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
 o 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
 o 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
 o saveProperties
 public void saveProperties()
Saves the current properties to file.