Constructor and Description |
---|
ExplicitTreeNode()
Basic constructor.
|
Modifier and Type | Method and Description |
---|---|
NodeData |
Data()
Getter for node TreeNode.
|
void |
Data(NodeData data)
Setter for node TreeNode.
|
ExplicitTreeNode |
Duplicate()
Duplicates self with same pointers and TreeNode values.
|
int |
GetNodePositionOnLevel(ExplicitTreeNode compareNode,
ExplicitTreeNode rootNode)
Gets number of prior nodes at same level.
|
ExplicitTreeNode |
LeftChild()
Getter for left child node.
|
void |
LeftChild(ExplicitTreeNode leftChild)
Setter for left child node.
|
int |
NodeLevel()
Getter for node level.
|
void |
NodeLevel(int nodeLevel)
Setter for node level.
|
ExplicitTreeNode |
Parent()
Getter for parent node.
|
void |
Parent(ExplicitTreeNode parent)
Setter for parent node.
|
ExplicitTreeNode |
RightChild()
Getter for right child node.
|
void |
RightChild(ExplicitTreeNode rightChild)
Setter for right child node.
|
protected void |
SetNodeLevel()
Sets level of node within tree.
|
int |
SizeOfSubtree()
Getter for size of subtree.
|
void |
SizeOfSubtree(int sizeOfSubtree)
Setter for size of subtree.
|
public int NodeLevel()
public void NodeLevel(int nodeLevel)
public int SizeOfSubtree()
public void SizeOfSubtree(int sizeOfSubtree)
sizeOfSubtree
- Number of connected child nodes.public ExplicitTreeNode Parent()
public void Parent(ExplicitTreeNode parent)
parent
- Parent for node to hold.public ExplicitTreeNode LeftChild()
public void LeftChild(ExplicitTreeNode leftChild)
leftChild
- Child for node to hold.public ExplicitTreeNode RightChild()
public void RightChild(ExplicitTreeNode rightChild)
rightChild
- Child for node to hold.public NodeData Data()
public void Data(NodeData data)
public ExplicitTreeNode Duplicate()
public int GetNodePositionOnLevel(ExplicitTreeNode compareNode, ExplicitTreeNode rootNode)
compareNode
- Node to compare at.rootNode
- Root of tree.protected void SetNodeLevel()