Stay organized with collections
Save and categorize content based on your preferences.
NodeChangeEvent
open class NodeChangeEvent : EventObject
An event emitted by a Preferences node to indicate that a child of that node has been added or removed.
Note, that although NodeChangeEvent inherits Serializable interface from java.util.EventObject, it is not intended to be Serializable. Appropriate serialization methods are implemented to throw NotSerializableException.
Summary
Public constructors |
Constructs a new NodeChangeEvent instance.
|
Public methods |
open Preferences! |
Returns the node that was added or removed.
|
open Preferences! |
Returns the parent of the node that was added or removed.
|
Public constructors
NodeChangeEvent
NodeChangeEvent(
parent: Preferences!,
child: Preferences!)
Constructs a new NodeChangeEvent
instance.
Parameters |
parent |
Preferences!: The parent of the node that was added or removed. |
child |
Preferences!: The node that was added or removed. |
Public methods
getChild
open fun getChild(): Preferences!
Returns the node that was added or removed.
Return |
Preferences! |
The node that was added or removed. |
getParent
open fun getParent(): Preferences!
Returns the parent of the node that was added or removed.
Return |
Preferences! |
The parent Preferences node whose child was added or removed |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# NodeChangeEvent\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nNodeChangeEvent\n===============\n\n```\nopen class NodeChangeEvent : EventObject\n```\n\n|---|---|--------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) |||\n| ↳ | [java.util.EventObject](../EventObject.html#) ||\n| | ↳ | [java.util.prefs.NodeChangeEvent](#) |\n\nAn event emitted by a Preferences node to indicate that a child of that node has been added or removed.\n\nNote, that although NodeChangeEvent inherits Serializable interface from java.util.EventObject, it is not intended to be Serializable. Appropriate serialization methods are implemented to throw NotSerializableException.\n\nSummary\n-------\n\n| Public constructors ||\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| [NodeChangeEvent](#NodeChangeEvent(java.util.prefs.Preferences,%20java.util.prefs.Preferences))`(`parent:` `[Preferences](/reference/kotlin/java/util/prefs/Preferences)!`, `child:` `[Preferences](/reference/kotlin/java/util/prefs/Preferences)!`)` Constructs a new `NodeChangeEvent` instance. |\n\n| Public methods ||\n|--------------------------------------------------------------------|-----------------------------------------------------------------------------------------|\n| open [Preferences](/reference/kotlin/java/util/prefs/Preferences)! | [getChild](#getChild())`()` Returns the node that was added or removed. |\n| open [Preferences](/reference/kotlin/java/util/prefs/Preferences)! | [getParent](#getParent())`()` Returns the parent of the node that was added or removed. |\n\n| Inherited functions ||\n|---|---|\n| From class [EventObject](../EventObject.html#) |----------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------| | [Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)! | [getSource](../EventObject.html#getSource())`()` The object on which the Event initially occurred. \u003cbr /\u003e | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [toString](../EventObject.html#toString())`()` Returns a String representation of this EventObject. \u003cbr /\u003e | ||\n\n| Inherited properties ||\n|---|---|\n| From class [EventObject](../EventObject.html#) |-----------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------| | [Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)! | [source](../EventObject.html#source:kotlin.Any) The object on which the Event initially occurred. \u003cbr /\u003e | ||\n\nPublic constructors\n-------------------\n\n### NodeChangeEvent\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nNodeChangeEvent(\n parent: Preferences!, \n child: Preferences!)\n```\n\nConstructs a new `NodeChangeEvent` instance.\n\n| Parameters ||\n|----------|------------------------------------------------------------------------------------------------------------------|\n| `parent` | [Preferences](/reference/kotlin/java/util/prefs/Preferences)!: The parent of the node that was added or removed. |\n| `child` | [Preferences](/reference/kotlin/java/util/prefs/Preferences)!: The node that was added or removed. |\n\nPublic methods\n--------------\n\n### getChild\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun getChild(): Preferences!\n```\n\nReturns the node that was added or removed.\n\n| Return ||\n|---------------------------------------------------------------|-------------------------------------|\n| [Preferences](/reference/kotlin/java/util/prefs/Preferences)! | The node that was added or removed. |\n\n### getParent\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun getParent(): Preferences!\n```\n\nReturns the parent of the node that was added or removed.\n\n| Return ||\n|---------------------------------------------------------------|--------------------------------------------------------------|\n| [Preferences](/reference/kotlin/java/util/prefs/Preferences)! | The parent Preferences node whose child was added or removed |"]]