Skip to content
On this page

TreeNode<T>

Constructors

OverloadDescription
new TreeNode(value: T, _tree: Tree<T>, parent: null | TreeNode<T>, _treeId: null | Symbol): TreeNode<T>

Properties

NameDescription
treeThe tree that the node belongs to.

Methods

NameDescription
detach(): voidDetaches the node from its tree.
displayConsole(indent: number): void
hasEqualTree(id: Symbol): booleanchecks if node is in the same tree with provided id.
hasList(): booleanchecks if node is in a tree.
isEqual(node: TreeNode<T>): booleanchecks if the node is equal to another node.