FileDocCategorySizeDatePackage
PreferenceChangeEvent.javaAPI DocAndroid 1.5 API3569Wed May 06 22:41:04 BST 2009java.util.prefs

PreferenceChangeEvent

public class PreferenceChangeEvent extends EventObject implements Serializable
This is the event class to indicate that a preference has been added, deleted or updated.

Please note that the serialization functionality has not yet been implemented, so the serialization methods do nothing but throw a {@code NotSerializableException}.

since
Android 1.0

Fields Summary
private static final long
serialVersionUID
private final Preferences
node
private final String
key
private final String
value
Constructors Summary
public PreferenceChangeEvent(Preferences p, String k, String v)
Construct a new {@code PreferenceChangeEvent} instance.

param
p the {@code Preferences} instance that fired this event; this object is considered as the event's source.
param
k the changed preference key.
param
v the new value of the changed preference, this value can be {@code null}, which means the preference has been removed.
since
Android 1.0


                                                                                                                        
           
        super(p);
        node = p;
        key = k;
        value = v;
    
Methods Summary
public java.lang.StringgetKey()
Gets the key of the changed preference.

return
the changed preference's key.
since
Android 1.0

        return key;
    
public java.lang.StringgetNewValue()
Gets the new value of the changed preference or {@code null} if the preference has been removed.

return
the new value of the changed preference or null if the preference has been removed.
since
Android 1.0

        return value;
    
public java.util.prefs.PreferencesgetNode()
Gets the {@code Preferences} instance that fired this event.

return
the {@code Preferences} instance that fired this event.
since
Android 1.0

        return node;
    
private voidreadObject(java.io.ObjectInputStream in)

        throw new NotSerializableException();
    
private voidwriteObject(java.io.ObjectOutputStream out)

        throw new NotSerializableException();