DataNode

class DataNode<T> : ComponentNode
kotlin.Any
   ↳ androidx.ui.core.ComponentNode
   ↳ androidx.ui.core.DataNode

A ComponentNode that stores a value in the emitted hierarchy

Summary

Public constructors

<init>(key: DataNodeKey<T>, value: T)

A ComponentNode that stores a value in the emitted hierarchy

Public methods

Unit
attach(owner: Owner)

Set the Owner of this ComponentNode.

Inherited functions

Inherited extension functions

From androidx.ui.core
Unit

Inserts a child ComponentNode at a last index.

ComponentNode?

Executes selector on every parent of this ComponentNode and returns the closest ComponentNode to return true from selector or null if selector returns false for all ancestors.

LayoutNode?

Executes block on first level of LayoutNode descendants of this ComponentNode and returns the last LayoutNode to return true from block.

Boolean

Returns true if this ComponentNode has no descendant LayoutNodes.

Boolean

Returns true if this ComponentNode currently has an ComponentNode.owner.

Owner

Returns ComponentNode.owner or throws if it is null.

Unit

Executes block on first level of LayoutNode descendants of this ComponentNode.

Properties

DataNodeKey<T>

The key object used to identify the key

T

The value of the data being stored in the hierarchy

Inherited properties

Public constructors

<init>

DataNode(
    key: DataNodeKey<T>,
    value: T)

A ComponentNode that stores a value in the emitted hierarchy

Parameters
T The type used for the value

Public methods

attach

fun attach(owner: Owner): Unit

Set the Owner of this ComponentNode. This ComponentNode must not already be attached. owner must match its parent.owner.

Properties

key

val key: DataNodeKey<T>

The key object used to identify the key

value

var value: T

The value of the data being stored in the hierarchy