findNearestAncestor
Function
Common
fun DelegatableNode.findNearestAncestor(key: Any?): TraversableNode?
Finds the nearest traversable ancestor with a matching key
.
Common
fun <T> T.findNearestAncestor(): T? where T : TraversableNode
Finds the nearest ancestor of the same class and key.