Package mars.settings

Class IntegerSetting

java.lang.Object
mars.settings.IntegerSetting

public class IntegerSetting extends Object
Class representing a persistent integer setting and its current value.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    get()
    Get the value currently stored in this setting.
    int
    Get the default value for this setting.
    Get the key used to identify this setting in Preferences.
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • getKey

      public String getKey()
      Get the key used to identify this setting in Preferences.
      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.