UnvaluedBinaryTreeBuilderString

com.phasmidsoftware.lascala.tree.UnvaluedBinaryTree.UnvaluedBinaryTreeBuilderString

Attributes

Graph
Supertypes
trait TreeBuilder[String]
class Object
trait Matchable
class Any
Self type

Members list

Value members

Inherited methods

def buildLeaf(a: String): Node[String]

Build a new leaf, given a value

Build a new leaf, given a value

Value parameters

a

the value for the leaf

Attributes

Returns

a node which is a leaf node

Inherited from:
UnvaluedBinaryTreeBuilder
def buildTree(x: Node[String], y: Node[String]): Tree[String]

Attributes

Inherited from:
UnvaluedBinaryTreeBuilder
def buildTree(maybeValue: Option[String], children: Seq[Node[String]]): Tree[String]

Build a new tree, given a value and child nodes

Build a new tree, given a value and child nodes

Value parameters

children

the the children of the node

maybeValue

the (optional) value which the new tree will have at its root

Attributes

Returns

a tree the (optional) value at the root and children as the immediate descendants

Inherited from:
UnvaluedBinaryTreeBuilder
def getParent(tree: Tree[String], t: String): Option[Node[String]]

Get a node from an existing tree to which a new node with value a can be attached

Get a node from an existing tree to which a new node with value a can be attached

Value parameters

a

the value of the new node

tree

the tree whence we want to find the (potential) parent of a new node with value a

Attributes

Returns

the Node to which the new node will be attached (if such a node exists). Note that this might be a leaf

Inherited from:
UnvaluedBinaryTreeBuilder
def nodesAlike(x: Node[String], y: Node[String]): Boolean

This non-tail-recursive method determines if the two given nodes are structurally the same

This non-tail-recursive method determines if the two given nodes are structurally the same

Value parameters

x

node x

y

node y

Attributes

Returns

true if they are the same

Inherited from:
UnvaluedBinaryTreeBuilder