Interface
ITree<T>

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:

cs-api-definition
public interface ITree<T>

Properties

Data

Gets the data held in this node.

Declaration

cs-api-definition
T Data { get; }

Property Value

T

The data.

Degree

Gets the degree of this node.

Declaration

cs-api-definition
int Degree { get; }

Property Value

int

The degree of this node.

Height

Gets the height of this tree.

Declaration

cs-api-definition
int Height { get; }

Property Value

int

The height of this tree.

IsLeafNode

Gets a value indicating whether this instance is leaf node.

Declaration

cs-api-definition
bool IsLeafNode { get; }

Property Value

bool

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

Parent

Gets the parent of the current node.

Declaration

cs-api-definition
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

cs-api-definition
void Add(ITree<T> child)

Parameters

child

ITree<T>

The child to add..

FindNode(Predicate<T>)

Finds the node for which the given predicate holds true.

Declaration

cs-api-definition
ITree<T> FindNode(Predicate<T> condition)

Parameters

condition

Predicate<T>

The condition to test on the data item.

Returns

ITree<T>

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

GetChild(int)

Gets the child at the specified index.

Declaration

cs-api-definition
ITree<T> GetChild(int index)

Parameters

index

int

The index.

Returns

ITree<T>

The child at the specified index.

Remove(ITree<T>)

Removes the specified child.

Declaration

cs-api-definition
bool Remove(ITree<T> child)

Parameters

child

ITree<T>

The child.

Returns

bool

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