Package mars.settings
Class StringSetting
java.lang.Object
mars.settings.StringSetting
Class representing a persistent string setting and its current value.
-
Method Summary
Modifier and TypeMethodDescriptionget()
Get the value currently stored in this setting.Get the default value for this setting.getKey()
Get the key used to identify this setting inPreferences
.void
Set the value of this setting, updating persistent storage.void
setDefault
(String value) Set the default value for this setting without updating the current value.void
setNonPersistent
(String value) Set the value of this setting without updating persistent storage.
-
Method Details
-
getKey
Get the key used to identify this setting inPreferences
.- Returns:
- The string key for this setting.
-
get
Get the value currently stored in this setting.- Returns:
- The string value for this setting.
-
set
Set the value of this setting, updating persistent storage.- Parameters:
value
- The new string value for this setting.
-
getDefault
Get the default value for this setting.- Returns:
- The default string value for this setting.
-
setDefault
Set the default value for this setting without updating the current value.- Parameters:
value
- The new default string value for this setting.
-
setNonPersistent
Set the value of this setting without updating persistent storage.- Parameters:
value
- The new string value for this setting.
-