java.lang.Objectedu.gwu.champAlg.PropertyExtractor
public class PropertyExtractor
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 |
---|
public PropertyExtractor(java.lang.String fullPathName) throws ChampAlgException
ChampAlgException
public PropertyExtractor(java.io.File propFile) throws ChampAlgException
ChampAlgException
Method Detail |
---|
public int size()
public java.lang.String getStringProperty(java.lang.String paramName) throws ChampAlgException
paramName
- a String
value
String
value
ChampAlgException
- if an error occurspublic double getDoubleProperty(java.lang.String paramName) throws ChampAlgException
paramName
- a String
value
double
value
ChampAlgException
- if an error occurspublic int getIntProperty(java.lang.String paramName) throws ChampAlgException
paramName
- a String
value
double
value
ChampAlgException
- if an error occurspublic boolean getBooleanProperty(java.lang.String paramName) throws ChampAlgException
paramName
- a String
value
double
value
ChampAlgException
- if an error occurspublic void printPropertiesToDebug()