Turns all arguments in args into a string that describes the arguments.
Turns all arguments in args into a string that describes the arguments.
argument string
Arguments that should be printed.
Arguments that should be printed. The default implementation excludes children.
Checks if other is a direct child of this tree.
Checks if other is a direct child of this tree.
other tree
true, iff other is a direct child of this tree
Checks if the parameter tree is contained within this tree.
Checks if the parameter tree is contained within this tree. A tree always contains itself.
other tree
true, iff other is contained in that tree
Returns a string-tree representation of the node.
Returns a string-tree representation of the node.
tree-style representation of that node and all children
(Changed in version 2.9.0) The behavior of scanRight has changed. The previous behavior can be reproduced with scanRight.reverse.
Prints a tree representation of the node.
(Changed in version 2.9.0) transpose throws an IllegalArgumentException if collections are not uniformly sized.
This is the basic tree node class. Usually it makes more sense to use
AbstractTreeNode, which uses reflection to generate thechildrenandwithNewChildrenfield/method. Our benchmarks show that manually implementing them can result in a speedup of a factor of ~3 for tree rewrites, so in performance critical places it might make sense to extendTreeNodeinstead.This class uses array operations instead of Scala collections, both for improved performance as well as to save stack frames during recursion, which allows it to operate on trees that are several thousand nodes high.