Class IEclipsePreferences.PreferenceChangeEvent
- java.lang.Object
-
- java.util.EventObject
-
- org.eclipse.core.runtime.preferences.IEclipsePreferences.PreferenceChangeEvent
-
- All Implemented Interfaces:
java.io.Serializable
- Enclosing interface:
- IEclipsePreferences
public static final class IEclipsePreferences.PreferenceChangeEvent extends java.util.EventObjectAn event object describing the details of a change to a preference in the preference store.- Since:
- 3.0
- See Also:
IEclipsePreferences.IPreferenceChangeListener, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PreferenceChangeEvent(java.lang.Object node, java.lang.String key, java.lang.Object oldValue, java.lang.Object newValue)Constructor for a new preference change event.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetKey()Return the key of the preference which was changed.java.lang.ObjectgetNewValue()Return the new value for the preference encoded as aString, ornullif the preference was removed.org.osgi.service.prefs.PreferencesgetNode()Return the preference node on which the change occurred.java.lang.ObjectgetOldValue()Return the old value for the preference encoded as aString, ornullif the preference was removed or if it cannot be determined.
-
-
-
Constructor Detail
-
PreferenceChangeEvent
public PreferenceChangeEvent(java.lang.Object node, java.lang.String key, java.lang.Object oldValue, java.lang.Object newValue)Constructor for a new preference change event. The node and the key must not benull. The old and new preference values must be either aStringornull.- Parameters:
node- the node on which the change occurredkey- the preference keyoldValue- the old preference value, as aStringornullnewValue- the new preference value, as aStringornull
-
-
Method Detail
-
getNode
public org.osgi.service.prefs.Preferences getNode()
Return the preference node on which the change occurred. Must not benull.- Returns:
- the node
-
getKey
public java.lang.String getKey()
Return the key of the preference which was changed. Must not benull.- Returns:
- the preference key
-
getNewValue
public java.lang.Object getNewValue()
Return the new value for the preference encoded as aString, ornullif the preference was removed.- Returns:
- the new value or
null
-
getOldValue
public java.lang.Object getOldValue()
Return the old value for the preference encoded as aString, ornullif the preference was removed or if it cannot be determined.- Returns:
- the old value or
null
-
-