de.matthiasmann.twl.model
Class PersistentEnumModel<T extends java.lang.Enum<T>>

java.lang.Object
  extended by de.matthiasmann.twl.model.HasCallback
      extended by de.matthiasmann.twl.model.AbstractEnumModel<T>
          extended by de.matthiasmann.twl.model.PersistentEnumModel<T>
Type Parameters:
T - The enum type
All Implemented Interfaces:
EnumModel<T>, WithRunnableCallback

public class PersistentEnumModel<T extends java.lang.Enum<T>>
extends AbstractEnumModel<T>


Constructor Summary
PersistentEnumModel(java.util.prefs.Preferences prefs, java.lang.String prefKey, java.lang.Class<T> enumClass, T defaultValue)
           
PersistentEnumModel(java.util.prefs.Preferences prefs, java.lang.String prefKey, T defaultValue)
           
 
Method Summary
 T getValue()
           
 void setValue(T value)
           
 
Methods inherited from class de.matthiasmann.twl.model.AbstractEnumModel
getEnumClass
 
Methods inherited from class de.matthiasmann.twl.model.HasCallback
addCallback, doCallback, hasCallbacks, removeCallback
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.matthiasmann.twl.utils.WithRunnableCallback
addCallback, removeCallback
 

Constructor Detail

PersistentEnumModel

public PersistentEnumModel(java.util.prefs.Preferences prefs,
                           java.lang.String prefKey,
                           T defaultValue)

PersistentEnumModel

public PersistentEnumModel(java.util.prefs.Preferences prefs,
                           java.lang.String prefKey,
                           java.lang.Class<T> enumClass,
                           T defaultValue)
Method Detail

getValue

public T getValue()

setValue

public void setValue(T value)