Interface ITree<T>
An interface for the tree data structure.
Namespace: Telerik.Windows.Diagrams.Core
Assembly: Telerik.Windows.Diagrams.Core.dll
Syntax
public interface ITree<T>
Type Parameters
T
The type of elements in the tree. |
Properties
Data
Gets the data held in this node.
Declaration
T Data { get; }
Property Value
T
The data. |
Degree
Gets the degree of this node.
Declaration
int Degree { get; }
Property Value
System.Int32
The degree of this node. |
Height
Gets the height of this tree.
Declaration
int Height { get; }
Property Value
System.Int32
The height of this tree. |
IsLeafNode
Gets a value indicating whether this instance is leaf node.
Declaration
bool IsLeafNode { get; }
Property Value
System.Boolean
|
Parent
Gets the parent of the current node.
Declaration
ITree<T> Parent { get; }
Property Value
ITree<T>
The parent of the current node. |
Methods
Add(ITree<T>)
Adds the specified child to the tree.
Declaration
void Add(ITree<T> child)
Parameters
ITree<T>
child
The child to add.. |
FindNode(Predicate<T>)
Finds the node for which the given predicate holds true.
Declaration
ITree<T> FindNode(Predicate<T> condition)
Parameters
System.Predicate<T>
condition
The condition to test on the data item. |
Returns
ITree<T>
The fist node that matches the condition if found, otherwise null. |
GetChild(Int32)
Gets the child at the specified index.
Declaration
ITree<T> GetChild(int index)
Parameters
System.Int32
index
The index. |
Returns
ITree<T>
The child at the specified index. |
Remove(ITree<T>)
Removes the specified child.
Declaration
bool Remove(ITree<T> child)
Parameters
ITree<T>
child
The child. |
Returns
System.Boolean
An indication of whether the child was found (and removed) from this tree. |