nachos.machine
Class Config
java.lang.Object
|
+--nachos.machine.Config
- public final class Config
- extends Object
Provides routines to access the Nachos configuration.
|
Method Summary |
static boolean |
getBoolean(String key)
Get the value of a boolean key in nachos.conf. |
static double |
getDouble(String key)
Get the value of a double key in nachos.conf. |
static int |
getInteger(String key)
Get the value of an integer key in nachos.conf. |
static String |
getString(String key)
Get the value of a key in nachos.conf. |
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 |
Config
public Config()
load
public static void load(String fileName)
- Load configuration information from the specified file. Must be called
before the Nachos security manager is installed.
- Parameters:
fileName - the name of the file containing the
configuration to use.
getString
public static String getString(String key)
- Get the value of a key in nachos.conf.
- Parameters:
key - the key to look up.- Returns:
- the value of the specified key, or null if it is not
present.
getInteger
public static int getInteger(String key)
- Get the value of an integer key in nachos.conf.
- Parameters:
key - the key to look up.- Returns:
- the value of the specified key.
getDouble
public static double getDouble(String key)
- Get the value of a double key in nachos.conf.
- Parameters:
key - the key to look up.- Returns:
- the value of the specified key.
getBoolean
public static boolean getBoolean(String key)
- Get the value of a boolean key in nachos.conf.
- Parameters:
key - the key to look up.- Returns:
- the value of the specified key.