Function

traverseChildren

Executes [block] for all direct children of the node with a matching [key].

traverseChildren

Common
fun DelegatableNode.traverseChildren(key: Any?, block: (TraversableNode) -> Boolean)

Executes block for all direct children of the node with a matching key.

Note 1: This stops at the children and does not include grandchildren and so on down the tree.

Note 2: The parameter block's return boolean value will determine if the traversal will continue (true = continue, false = cancel).


traverseChildren

Common
fun <T> T.traverseChildren(block: (T) -> Boolean) where T : TraversableNode

Executes block for all direct children of the node that are of the same class.

Note 1: This stops at the children and does not include grandchildren and so on down the tree.

Note 2: The parameter block's return boolean value will determine if the traversal will continue (true = continue, false = cancel).