Android
java.util.prefs
public class

java.util.prefs.PreferenceChangeEvent

java.lang.Object
java.util.EventObject Serializable
java.util.prefs.PreferenceChangeEvent Serializable

This is the event class to indicate some preferences has been added, deleted or updated.

Please note that this class cannot be serialized actually, so relevant serialization methods only throw NotSerializableException.

Summary

Fields inherited from class java.util.EventObject

Public Constructors

            PreferenceChangeEvent(Preferences p, String k, String v)
Construct a new PreferenceChangeEvent instance.

Public Methods

          String  getKey()
Get the changed preference's key.
          String  getNewValue()
Get the new value of the changed preference, or null if this preference is removed.
          Preferences  getNode()
Get the Preferences instance that this event happened.
Methods inherited from class java.util.EventObject
Methods inherited from class java.lang.Object

Details

Public Constructors

public PreferenceChangeEvent(Preferences p, String k, String v)

Construct a new PreferenceChangeEvent instance.

Parameters

p the Preferences instance that this event happened, this object is considered as event's source.
k the changed preference's key
v the new value of the changed preference, this value can be null, which means the preference is removed.

Public Methods

public String getKey()

Get the changed preference's key.

Returns

  • the changed preference's key

public String getNewValue()

Get the new value of the changed preference, or null if this preference is removed.

Returns

  • the new value of the changed preference, or null if this preference is removed.

public Preferences getNode()

Get the Preferences instance that this event happened.

Returns

  • the Preferences instance that this event happened.
Copyright 2007 Google Inc. Build 0.9_r1-98467 - 14 Aug 2008 18:48