Package VASSAL.preferences
Class ReadOnlyPrefs
java.lang.Object
VASSAL.preferences.ReadOnlyPrefs
public class ReadOnlyPrefs extends Object
A simple preferences class which permits reading stored values.
- Since:
- 3.1.0
- Author:
- Joel Uckelman
-
Field Summary
Fields Modifier and Type Field Description protected PropertiesstoredValues -
Constructor Summary
Constructors Modifier Constructor Description protectedReadOnlyPrefs(File file)ReadOnlyPrefs(String name) -
Method Summary
Modifier and Type Method Description static ReadOnlyPrefsgetGlobalPrefs()Return the module-independent global preferences.StringgetStoredValue(String key)Return the value of a given preference.
-
Field Details
-
storedValues
-
-
Constructor Details
-
ReadOnlyPrefs
- Parameters:
name- the module name of the preferences to read
-
ReadOnlyPrefs
-
-
Method Details
-
getStoredValue
Return the value of a given preference.- Parameters:
key- the name of the preference to retrieve- Returns:
- the value of this option in the Preferences file, or
nullif undefined
-
getGlobalPrefs
Return the module-independent global preferences.- Returns:
- a global preferences object
-