Class BinaryTreeNode<T>
- Namespace
- Garyon.DataStructures.Trees
- Assembly
- Garyon.dll
Represents a binary tree node, which is a component that is contained within a binary tree.
public class BinaryTreeNode<T> : BinaryTreeNode<T, BinaryTree<T>, BinaryTreeNode<T>>, ITreeNode<T, BinaryTree<T>, BinaryTreeNode<T>>, ITreeNode<T>, IEnumerable<T>, IEnumerable
Type Parameters
TThe type of the value that is stored in the node.
- Inheritance
-
BinaryTreeNode<T>
- Implements
-
ITreeNode<T>IEnumerable<T>
- Inherited Members
- Extension Methods
Constructors
BinaryTreeNode(BinaryTreeNode<T>, BinaryTreeNode<T>, BinaryTreeNode<T>, T)
Initializes a new instance of the BinaryTreeNode<T> class with a parent and children nodes. The base tree is considered to be that of the parent.
public BinaryTreeNode(BinaryTreeNode<T> parentNode, BinaryTreeNode<T> leftChild, BinaryTreeNode<T> rightChild, T value = default)
Parameters
parentNodeBinaryTreeNode<T>The parent node.
leftChildBinaryTreeNode<T>The left child node.
rightChildBinaryTreeNode<T>The right child node.
valueTThe value of the node.
BinaryTreeNode(BinaryTreeNode<T>, T)
Initializes a new instance of the BinaryTreeNode<T> class with a parent node, but no children nodes. The base tree is considered to be that of the parent.
public BinaryTreeNode(BinaryTreeNode<T> parentNode, T value = default)
Parameters
parentNodeBinaryTreeNode<T>The parent node.
valueTThe value of the node.
BinaryTreeNode(BinaryTree<T>, T)
Initializes a new instance of the BinaryTreeNode<T> class with a base tree, but no parent or children nodes.
public BinaryTreeNode(BinaryTree<T> baseTree, T value = default)
Parameters
baseTreeBinaryTree<T>The base tree that contains this node.
valueTThe value of the node.
BinaryTreeNode(T)
Initializes a new instance of the BinaryTreeNode<T> class with no base tree, parent or children nodes.
public BinaryTreeNode(T value = default)
Parameters
valueTThe value of the node.
Methods
InitializeNewNode(BinaryTreeNode<T>, T)
Initializes a new instance of the TreeNode<T> class with a parent node. The base tree is considered to be that of the parent.
protected override BinaryTreeNode<T> InitializeNewNode(BinaryTreeNode<T> parentNode, T value = default)
Parameters
parentNodeBinaryTreeNode<T>The parent node.
valueTThe value of the node.
Returns
InitializeNewNode(BinaryTree<T>, T)
Initializes a new instance of the TreeNode<T> class with a base tree, but no parent node.
protected override BinaryTreeNode<T> InitializeNewNode(BinaryTree<T> baseTree, T value = default)
Parameters
baseTreeBinaryTree<T>The base tree that contains this node.
valueTThe value of the node.
Returns
InitializeNewNode(T)
Initializes a new instance of the TreeNode<T> class with no base tree or parent node.
protected override BinaryTreeNode<T> InitializeNewNode(T value = default)
Parameters
valueTThe value of the node.