textbender.g.util.prefs
Class BooleanPreferenceDC

java.lang.Object
  extended by Preference
      extended by BooleanPreference
          extended by BooleanPreferenceDC

public class BooleanPreferenceDC
extends BooleanPreference

A default-clear boolean preference. It is removed when it matches the default, rather than stored.


Field Summary
 
Fields inherited from class Preference
key, preferences
 
Constructor Summary
BooleanPreferenceDC(Preferences preferences, String key, boolean def)
          Creates a BooleanPreferenceDC.
 
Method Summary
 void put(boolean value)
          Stores a new value for the preference, or removes it if it matches the default.
 
Methods inherited from class BooleanPreference
get, getDefault, setDefault
 
Methods inherited from class Preference
key, preferences, remove
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BooleanPreferenceDC

public BooleanPreferenceDC(Preferences preferences,
                           String key,
                           boolean def)
Creates a BooleanPreferenceDC.

Parameters:
preferences - per preferences()
key - per key()
def - default per getDefault()
Method Detail

put

public void put(boolean value)
Stores a new value for the preference, or removes it if it matches the default.

Overrides:
put in class BooleanPreference
Parameters:
value - new value of the preference