edu.gwu.champAlg
Class PropertyExtractor

java.lang.Object
  extended by edu.gwu.champAlg.PropertyExtractor

public class PropertyExtractor
extends java.lang.Object

An instance of this is passed on to algorithms to make it easy to read what's in a properties file. This means, you can add stuff to a properties file and then use this instance to read from that file.


Constructor Summary
PropertyExtractor(java.io.File propFile)
           
PropertyExtractor(java.lang.String fullPathName)
           
 
Method Summary
 boolean getBooleanProperty(java.lang.String paramName)
          Read in a boolean value from the properties file.
 double getDoubleProperty(java.lang.String paramName)
          Read in a double value from the properties file.
 int getIntProperty(java.lang.String paramName)
          Read in an int value from the properties file.
 java.lang.String getStringProperty(java.lang.String paramName)
          Get a String property.
 void printPropertiesToDebug()
           
 int size()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyExtractor

public PropertyExtractor(java.lang.String fullPathName)
                  throws ChampAlgException
Throws:
ChampAlgException

PropertyExtractor

public PropertyExtractor(java.io.File propFile)
                  throws ChampAlgException
Throws:
ChampAlgException
Method Detail

size

public int size()

getStringProperty

public java.lang.String getStringProperty(java.lang.String paramName)
                                   throws ChampAlgException
Get a String property.

Parameters:
paramName - a String value
Returns:
a String value
Throws:
ChampAlgException - if an error occurs

getDoubleProperty

public double getDoubleProperty(java.lang.String paramName)
                         throws ChampAlgException
Read in a double value from the properties file.

Parameters:
paramName - a String value
Returns:
a double value
Throws:
ChampAlgException - if an error occurs

getIntProperty

public int getIntProperty(java.lang.String paramName)
                   throws ChampAlgException
Read in an int value from the properties file.

Parameters:
paramName - a String value
Returns:
a double value
Throws:
ChampAlgException - if an error occurs

getBooleanProperty

public boolean getBooleanProperty(java.lang.String paramName)
                           throws ChampAlgException
Read in a boolean value from the properties file.

Parameters:
paramName - a String value
Returns:
a double value
Throws:
ChampAlgException - if an error occurs

printPropertiesToDebug

public void printPropertiesToDebug()