class TreeData
source · line 50public
public class TreeData<T> public constructor(public val roots: Array<TreeNode<T>>)
Indexes a loaded snapshot once, without allocating views or recursive traversal frames.
Extensions
public fun <T> TreeData<T>.moved(source: ViewKey, target: ViewKey, position: TreeDropPosition): TreeData<T>?· scoop:scoop.ui.component:0.1.0
function indexOfKey
source · line 125public
public fun indexOfKey(key: ViewKey): Long?
parameter key
source · line 125public
key: ViewKey
property loadedKeys
source · line 56public
public val loadedKeys: Array<ViewKey>
get: public read-only
getter get
source · line 56public
get(): Array<ViewKey>
function withChildren
source · line 145public
public fun withChildren(key: ViewKey, children: TreeChildren<T>): TreeData<T>
Replaces one branch and its ancestor path while retaining all unaffected node references.
parameter key
source · line 145public
key: ViewKey
parameter children
source · line 145public
children: TreeChildren<T>
function pathTo
source · line 131public
public fun pathTo(key: ViewKey): Array<ViewKey>?
Returns the known root-to-node path, including the requested key; never loads children.
parameter key
source · line 131public
key: ViewKey
property count
source · line 55public
public val count: Long
get: public read-only
getter get
source · line 55public
get(): Long
function node
source · line 126public
public fun node(key: ViewKey): TreeNode<T>?
parameter key
source · line 126public
key: ViewKey
property roots
source · line 50public
public val roots: Array<TreeNode<T>>
get: public read-only
constructor constructor
source · line 50public
constructor(public val roots: Array<TreeNode<T>>)
parameter roots
source · line 50public
public val roots: Array<TreeNode<T>>
type parameter T
source · line 50public
T