Class RedBlackTreeNode<TData>
Represents a red-black tree node.
Inheritance
System.Object
RedBlackTreeNode<TData>
Namespace: Solti.Utils.Primitives
Assembly: Solti.Utils.Primitives.dll
Syntax
public class RedBlackTreeNode<TData> : Object
Type Parameters
| Name | Description |
|---|---|
| TData |
Constructors
RedBlackTreeNode(TData, NodeColor)
Creates a new node.
Declaration
public RedBlackTreeNode(TData data, NodeColor color)
Parameters
| Type | Name | Description |
|---|---|---|
| TData | data | |
| NodeColor | color |
Properties
Color
The color of this node.
Declaration
public NodeColor Color { get; }
Property Value
| Type | Description |
|---|---|
| NodeColor |
Data
The associated data.
Declaration
public TData Data { get; }
Property Value
| Type | Description |
|---|---|
| TData |
Left
The left child of this node.
Declaration
public RedBlackTreeNode<TData> Left { get; }
Property Value
| Type | Description |
|---|---|
| RedBlackTreeNode<TData> |
Right
The right child of this node.
Declaration
public RedBlackTreeNode<TData> Right { get; }
Property Value
| Type | Description |
|---|---|
| RedBlackTreeNode<TData> |
Methods
DeepClone()
Clones the whole hierarchy starting from this node.
Declaration
public RedBlackTreeNode<TData> DeepClone()
Returns
| Type | Description |
|---|---|
| RedBlackTreeNode<TData> |
ShallowClone()
Clones the actual node only.
Declaration
public RedBlackTreeNode<TData> ShallowClone()
Returns
| Type | Description |
|---|---|
| RedBlackTreeNode<TData> |