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.
Prints a tree representation of the node.
(Changed in version 2.9.0) transpose throws an IllegalArgumentException if collections are not uniformly sized.
Class that implements the
childrenandwithNewChildrenmethods using reflection when implementingTreeNodewith a case class or case object.This class caches values that are expensive to recompute.
The constructor can also contain NonEmptyLists, Lists, and Options that contain children. This works as long as there the assignment of children in
withNewChildrento the different constructor parameters can be inferred.Inferred assignment of new children is done as follows:
newChildrento a constructor parameter that is a childOptionof a child: Assign some next child innewChildrenif the child type matches the element type of the Option, assign None otherwise.Listof children: Assign children fromnewChildrento the list until the type of a child does not match the element type of the list.It is possible to override the defaults and use custom
children/withNewChildrenimplementations.