Package mars.settings
Class BooleanSetting
java.lang.Object
mars.settings.BooleanSetting
Class representing a persistent boolean setting and its current value.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
get()
Get the value currently stored in this setting.boolean
Get the default value for this setting.getKey()
Get the key used to identify this setting inPreferences
.void
set
(boolean value) Set the value of this setting, updating persistent storage.void
setDefault
(boolean value) Set the default value for this setting without updating the current value.void
setNonPersistent
(boolean 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
public boolean get()Get the value currently stored in this setting.- Returns:
- The boolean value for this setting.
-
set
public void set(boolean value) Set the value of this setting, updating persistent storage.- Parameters:
value
- The new boolean value for this setting.
-
getDefault
public boolean getDefault()Get the default value for this setting.- Returns:
- The default boolean value for this setting.
-
setDefault
public void setDefault(boolean value) Set the default value for this setting without updating the current value.- Parameters:
value
- The new default boolean value for this setting.
-
setNonPersistent
public void setNonPersistent(boolean value) Set the value of this setting without updating persistent storage.- Parameters:
value
- The new boolean value for this setting.
-