class TreeNode extends AnyRef
The TreeNode
class is for a node in a tree.
- Alphabetic
- By Inheritance
- TreeNode
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
TreeNode(nid: Int, lev: Int, label: TLabel = TLabel_DEFAULT, colr: Color = null, ord: Int = 0)
- nid
the unique identifier for the node
- lev
the level of the node in the tree
- label
the node/incoming edge label
- colr
the color of the node
- ord
the birth order
Value Members
- val child: ArrayBuffer[TreeNode]
- var colr: Color
-
def
isAncestor(n: TreeNode): Boolean
Check if 'this' node is an ancestor of node 'n'.
Check if 'this' node is an ancestor of node 'n'.
- n
target node
-
def
isLeaf: Boolean
Determine whether 'this' node is a leaf.
- var label: TLabel
-
def
leftSibling: TreeNode
Return the left sibling of 'this' node.
- val lev: Int
- val loc: R2
- val nid: Int
- var ord: Int
- var parent: TreeNode
-
def
rightSibling: TreeNode
Return the right sibling of 'this' node.
-
def
toString(): String
Convert a tree node to a string.
Convert a tree node to a string.
- Definition Classes
- TreeNode → AnyRef → Any