TreeNode<T>
Constructors
Overload | Description |
---|---|
new TreeNode(value: T, _tree: Tree<T>, parent: null | TreeNode<T>, _treeId: null | Symbol): TreeNode<T> |
Properties
Name | Description |
---|---|
tree | The tree that the node belongs to. |
Methods
Name | Description |
---|---|
detach(): void | Detaches the node from its tree. |
displayConsole(indent: number): void | |
hasEqualTree(id: Symbol): boolean | checks if node is in the same tree with provided id. |
hasList(): boolean | checks if node is in a tree. |
isEqual(node: TreeNode<T>): boolean | checks if the node is equal to another node. |