Package mars.settings

Class BooleanSetting

java.lang.Object
mars.settings.BooleanSetting

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

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

    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 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.