allChildren

fun allChildren(enterCondition: (TreeNode<T>) -> Boolean = { true }, yieldCondition: (TreeNode<T>) -> Boolean = { true }): List<TreeNode<T>>

Traverses the tree in depth-first order and returns all nodes that satisfy yieldCondition. If enterCondition returns false for a node, its children are not traversed. By default, all nodes are traversed and all nodes are returned.