|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object nachos.machine.Config
public final class Config
Provides routines to access the Nachos configuration.
Constructor Summary | |
---|---|
Config()
|
Method Summary | |
---|---|
static boolean |
getBoolean(String key)
Get the value of a boolean key in nachos.conf. |
static boolean |
getBoolean(String key,
boolean defaultValue)
Get the value of a boolean key in nachos.conf, returning the specified default if the key does not exist. |
static double |
getDouble(String key)
Get the value of a double key in nachos.conf. |
static double |
getDouble(String key,
double defaultValue)
Get the value of a double key in nachos.conf, returning the specified default if the key does not exist. |
static int |
getInteger(String key)
Get the value of an integer key in nachos.conf. |
static int |
getInteger(String key,
int defaultValue)
Get the value of an integer key in nachos.conf, returning the specified default if the key does not exist. |
static String |
getString(String key)
Get the value of a key in nachos.conf. |
static String |
getString(String key,
String defaultValue)
Get the value of a key in nachos.conf, returning the specified default if the key does not exist. |
static void |
load(String fileName)
Load configuration information from the specified file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Config()
Method Detail |
---|
public static void load(String fileName)
fileName
- the name of the file containing the
configuration to use.public static String getString(String key)
key
- the key to look up.
public static String getString(String key, String defaultValue)
key
- the key to look up.defaultValue
- the value to return if the key does not exist.
public static int getInteger(String key)
key
- the key to look up.
public static int getInteger(String key, int defaultValue)
key
- the key to look up.defaultValue
- the value to return if the key does not exist.
public static double getDouble(String key)
key
- the key to look up.
public static double getDouble(String key, double defaultValue)
key
- the key to look up.defaultValue
- the value to return if the key does not exist.
public static boolean getBoolean(String key)
key
- the key to look up.
public static boolean getBoolean(String key, boolean defaultValue)
key
- the key to look up.defaultValue
- the value to return if the key does not exist.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |