Class BinaryNode<TNode>
Tree node for binary trees.
Implements
IBinaryTreeNode<TNode>
Namespace: ISynergy.Framework.Core.Collections
Assembly: ISynergy.Framework.Core.dll
Syntax
public class BinaryNode<TNode> : IEquatable<TNode>, IBinaryTreeNode<TNode> where TNode : BinaryNode<TNode>
Type Parameters
Name | Description |
---|---|
TNode | The class type for the nodes of the tree. |
Properties
View SourceChildren
Gets or sets the collection of child nodes under this node.
Declaration
public TNode[] Children { get; set; }
Property Value
Type | Description |
---|---|
TNode[] |
IsLeaf
Gets whether this node is a leaf (has no children).
Declaration
public bool IsLeaf { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Left
Gets or sets the left subtree of this node.
Declaration
public TNode Left { get; set; }
Property Value
Type | Description |
---|---|
TNode |
Right
Gets or sets the right subtree of this node.
Declaration
public TNode Right { get; set; }
Property Value
Type | Description |
---|---|
TNode |
Methods
View SourceEquals(TNode)
Indicates whether the current object is equal to another object of the same type.
Declaration
public bool Equals(TNode other)
Parameters
Type | Name | Description |
---|---|---|
TNode | other | An object to compare with this object. |
Returns
Type | Description |
---|---|
System.Boolean | true if the current object is equal to the |