| Modifier and Type | Field and Description |
|---|---|
| private final CopyOnWriteArrayList | |
| private final Map | |
| private static final Object |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static void | addPropertyChangeListener(Callback<String, Void> pcl)
Add a PropertyChangeListener for the specified setting Note that the PropertyChangeEvent will contain old and new values as they would be returned from get(), meaning they may come from the System Properties. |
| private void | |
| private void | |
| public static String | |
| public static boolean | |
| public static boolean | |
| private boolean | |
| private boolean | |
| private String | |
| private static synchronized Settings | |
| public static int | |
| private int | |
| public static void | removePropertyChangeListener(Callback<String, Void> pcl)
Remove the specified PropertyChangeListener. |
| private void | |
| public static void | |
| private void |
| listeners | back to summary |
|---|---|
| private final CopyOnWriteArrayList<Callback<String, Void>> listeners | |
| settings | back to summary |
|---|---|
| private final Map<String, String> settings | |
| SETTINGS_KEY | back to summary |
|---|---|
| private static final Object SETTINGS_KEY | |
| Settings | back to summary |
|---|---|
| private Settings() | |
| addPropertyChangeListener | back to summary |
|---|---|
| public static void addPropertyChangeListener(Callback<String, Void> pcl) Add a PropertyChangeListener for the specified setting Note that the PropertyChangeEvent will contain old and new values as they would be returned from get(), meaning they may come from the System Properties. If key is "" or null, this methods throws an IllegalArgumentException. If listener is null no exception is thrown and no action is taken. | |
| addPropertyChangeListenerImpl | back to summary |
|---|---|
| private void addPropertyChangeListenerImpl(Callback<String, Void> pcl) | |
| checkKeyArg | back to summary |
|---|---|
| private void checkKeyArg(String key) | |
| get | back to summary |
|---|---|
| public static String get(String key) Retrieve the value for the given key. If the key is not present in Settings or its value is null, this methods then checks to see if a value for this key is present in the System Properties (provided you have sufficient privileges). If no value can be found for the given key, this method returns null. If key is "" or null, this methods throws an IllegalArgumentException. | |
| getBoolean | back to summary |
|---|---|
| public static boolean getBoolean(String key) Convenience method for boolean settings. If the setting exists and its value is "true", true is returned. Otherwise, false is returned. If key is "" or null, this methods throws an IllegalArgumentException. | |
| getBoolean | back to summary |
|---|---|
| public static boolean getBoolean(String key, boolean defaultVal) Convenience method for boolean settings. If the setting is set to "true", true is returned. If the setting is set to "false", false is returned. It the setting is set to anything else, defaultVal is returned. If key is "" or null, this methods throws an IllegalArgumentException. | |
| getBooleanImpl | back to summary |
|---|---|
| private boolean getBooleanImpl(String key) | |
| getBooleanImpl | back to summary |
|---|---|
| private boolean getBooleanImpl(String key, boolean defaultVal) | |
| getImpl | back to summary |
|---|---|
| private String getImpl(String key) | |
| getInstance | back to summary |
|---|---|
| private static synchronized Settings getInstance() | |
| getInt | back to summary |
|---|---|
| public static int getInt(String key, int defaultVal) Convenience method for int settings. If the setting exists and its value can be parsed to an int, the int value is returned. Otherwise, the default value is returned. If key is "" or null, this methods throws an IllegalArgumentException. | |
| getIntImpl | back to summary |
|---|---|
| private int getIntImpl(String key, int defaultVal) | |
| removePropertyChangeListener | back to summary |
|---|---|
| public static void removePropertyChangeListener(Callback<String, Void> pcl) Remove the specified PropertyChangeListener. If listener is null, or was never added, no exception is thrown and no action is taken. | |
| removePropertyChangeListenerImpl | back to summary |
|---|---|
| private void removePropertyChangeListenerImpl(Callback<String, Void> pcl) | |
| set | back to summary |
|---|---|
| public static void set(String key, String value) Add a new key-value setting. Passing a value of null indicates that the value for this key should be looked for in the System Properties. If PropertyChangeListeners have been registered for the given key, they will be notified of a change in value. If key is "" or null, this methods throws an IllegalArgumentException. | |
| setImpl | back to summary |
|---|---|
| private void setImpl(String key, String value) | |