New to Telerik UI for WPFStart a free 30-day trial

ITree<T>

Interface

An interface for the tree data structure.

Definition

Namespace:Telerik.Windows.Diagrams.Core

Assembly:Telerik.Windows.Diagrams.Core.dll

Type Parameters:

T

The type of elements in the tree.

Syntax:

C#
public interface ITree<T>

Derived Classes: BinaryTree<TData>

Properties

Gets the data held in this node.

C#
T Data { get; }
Property Value:

The data.

Gets the degree of this node.

C#
int Degree { get; }
Property Value:

The degree of this node.

Gets the height of this tree.

C#
int Height { get; }
Property Value:

The height of this tree.

Gets a value indicating whether this instance is leaf node.

C#
bool IsLeafNode { get; }
Property Value:

true if this instance is leaf node; otherwise, false.

Gets the parent of the current node.

C#
ITree<T> Parent { get; }
Property Value:

The parent of the current node.

Methods

Adds the specified child to the tree.

C#
void Add(ITree<T> child)
Parameters:childITree<T>

The child to add..

Finds the node for which the given predicate holds true.

C#
ITree<T> FindNode(Predicate<T> condition)
Parameters:conditionPredicate<T>

The condition to test on the data item.

Returns:

ITree<T>

The fist node that matches the condition if found, otherwise null.

Gets the child at the specified index.

C#
ITree<T> GetChild(int index)
Parameters:indexint

The index.

Returns:

ITree<T>

The child at the specified index.

Removes the specified child.

C#
bool Remove(ITree<T> child)
Parameters:childITree<T>

The child.

Returns:

bool

An indication of whether the child was found (and removed) from this tree.