|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfern.tools.ConfigReader
public class ConfigReader
Reads simple config files for test cases and makes the data of it accessible.
The file has to contain lines likefield=value
If a line starts with // or # it is ignored.
| Constructor Summary | |
|---|---|
ConfigReader(String fn)
Reads the given file and stores the data. |
|
| Method Summary | |
|---|---|
double |
getAsDouble(String key)
Gets the value of the line key=value as double |
int |
getAsInt(String key)
Gets the value of the line key=value as int |
String |
getAsString(String key)
Gets the value of the line key=value as string |
String[] |
getAsStringArr(String key)
Gets the value of the line key=value as string array (the value is simply splitted by ,) |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ConfigReader(String fn)
throws IOException
fn - config file
IOException| Method Detail |
|---|
public String getAsString(String key)
key=value as string
key - name of the field
public String[] getAsStringArr(String key)
key=value as string array (the value is simply splitted by ,)
key - name of the field
public double getAsDouble(String key)
key=value as double
key - name of the field
public int getAsInt(String key)
key=value as int
key - name of the field
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||