textbender.g.util.prefs
Class IntegerPreferenceDC

java.lang.Object
  extended by Preference
      extended by IntegerPreference
          extended by IntegerPreferenceDC

public class IntegerPreferenceDC
extends IntegerPreference

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


Field Summary
 
Fields inherited from class Preference
key, preferences
 
Constructor Summary
IntegerPreferenceDC(Preferences preferences, String key, int def)
          Creates an IntegerPreferenceDC.
 
Method Summary
 void put(int value)
          Stores a new value for the preference, or removes it if it matches the default.
 
Methods inherited from class IntegerPreference
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

IntegerPreferenceDC

public IntegerPreferenceDC(Preferences preferences,
                           String key,
                           int def)
Creates an IntegerPreferenceDC.

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

put

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

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