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