Constructors
constructor
- new TreeNode<T>(id, value?, children?): TreeNode<T>
-
Parameters
-
id: string
-
Optional
value: T
-
Optional
children: TreeNode<T>[]
Properties
Private
Optional
_children
Private
Optional
_value
_value?: T
Accessors
children
- get children(): undefined | TreeNode<T>[]
-
Returns undefined | TreeNode<T>[]
- set children(value): void
-
Returns void
id
- get id(): string
-
Returns string
- set id(value): void
-
Returns void
value
- get value(): undefined | T
-
Returns undefined | T
- set value(value): void
-
Returns void
Methods
addChildren
- addChildren(children): void
-
Returns void
getHeight
- getHeight(): number
-
Returns number