|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object skyview.executive.Settings
public class Settings
This class defines a singleton where SkyView preferences/settings can be set and gotten from anywhere in the system. A setting is simply a key=string value. When there is to be more than one value for the key it should be specified as string1,string2,string3. A comma is not allowed as a character within a setting. Keys are case insensitive.
When specified in the command line Settings may sometimes be set with just the keyword. This is treated as equivalent to key=1.
Method Summary | |
---|---|
static void |
add(java.lang.String key,
java.lang.String value)
Add a setting to a list -- but only if it is not already in the list. |
static void |
addArgs(java.lang.String[] args)
Add settings from a list of arguments. |
static java.lang.String |
get(java.lang.String key)
Get a value corresponding to the key |
static java.lang.String |
get(java.lang.String key,
java.lang.String dft)
Get a values corresponding to a key or the default |
static java.lang.String[] |
getArray(java.lang.String key)
Get the values corresponding to a key as an array of strings. |
static java.lang.String[] |
getKeys()
Return the array of keys in the current settings |
static boolean |
has(java.lang.String key)
Check if the given key has been set |
static java.util.HashMap<java.lang.String,java.lang.String> |
pop()
Give a copy of the current settings and pop the stack |
static void |
push(java.util.HashMap<java.lang.String,java.lang.String> top)
|
static void |
put(java.lang.String key,
java.lang.String value)
Save a key and value |
static void |
restore()
Restore a previously saved state. |
static void |
save()
Save the current state of the settings for a later restoration |
static void |
suggest(java.lang.String key,
java.lang.String value)
This method works like put except that it does not add a pair if the keys is in the _nullvalues setting or if the Setting is already set. |
static void |
updateFromFile(java.lang.String settingsFile)
Try to read settings from a file |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void updateFromFile(java.lang.String settingsFile)
public static void addArgs(java.lang.String[] args)
public static java.lang.String get(java.lang.String key)
public static java.lang.String get(java.lang.String key, java.lang.String dft)
public static java.lang.String[] getArray(java.lang.String key)
public static void suggest(java.lang.String key, java.lang.String value)
public static void put(java.lang.String key, java.lang.String value)
public static void save()
public static void add(java.lang.String key, java.lang.String value)
public static boolean has(java.lang.String key)
public static java.lang.String[] getKeys()
public static void restore()
public static java.util.HashMap<java.lang.String,java.lang.String> pop()
public static void push(java.util.HashMap<java.lang.String,java.lang.String> top)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |