A node in a TreeCollection object.

Available since

1.0.0

.

See also:

Constructor

new(data:T, ?children:Array<TreeNode<T>>)

Creates a new TreeNode object with the given arguments.

Available since

1.0.0

.

Variables

children:Array<TreeNode<T>>

The children of this tree node. If this property is null, then this node is not a branch and has no children. If this property is an empty array, then this node is a branch with no children.

Available since

1.0.0

.

data:T

The data associated with this tree node.

Available since

1.0.0

.

Methods

isBranch():Bool

Indicates if this node is a branch or a leaf. A branch may contain zero or more children. If the children is not null, then this node is a branch.

Available since

1.0.0

.