# Class TreeNode<V>

#### Type Parameters

- #### V = any

#### Hierarchy

- TreeNode

- Defined in src/data-structures/tree/tree.ts:1

#####
Index

### Constructors

constructor

### Properties

_children?
_id
_value?

### Accessors

children
id
value

### Methods

addChildren
getHeight

## Constructors

### constructor

- new TreeNode<V>(id, value?, children?): TreeNode<V>

- #### Type Parameters

  - #### V = any

  #### Parameters

  - ##### id: string

  - ##### `Optional` value: V

  - ##### `Optional` children: TreeNode<V>[]

  #### Returns TreeNode<V>

  - Defined in src/data-structures/tree/tree.ts:2

## Properties

### `Private` `Optional` _children

_children?: TreeNode<V>[]

- Defined in src/data-structures/tree/tree.ts:28

### `Private` _id

_id: string

- Defined in src/data-structures/tree/tree.ts:8

### `Private` `Optional` _value

_value?: V

- Defined in src/data-structures/tree/tree.ts:18

## Accessors

### children

- get children(): undefined | TreeNode<V>[]

- #### Returns undefined | TreeNode<V>[]

  - Defined in src/data-structures/tree/tree.ts:30
- set children(value): void

- #### Parameters

  - ##### value: undefined | TreeNode<V>[]

  #### Returns void

  - Defined in src/data-structures/tree/tree.ts:34

### id

- get id(): string

- #### Returns string

  - Defined in src/data-structures/tree/tree.ts:10
- set id(value): void

- #### Parameters

  - ##### value: string

  #### Returns void

  - Defined in src/data-structures/tree/tree.ts:14

### value

- get value(): undefined | V

- #### Returns undefined | V

  - Defined in src/data-structures/tree/tree.ts:20
- set value(value): void

- #### Parameters

  - ##### value: undefined | V

  #### Returns void

  - Defined in src/data-structures/tree/tree.ts:24

## Methods

### addChildren

- addChildren(children): void

- #### Parameters

  - ##### children: TreeNode<V> | TreeNode<V>[]

  #### Returns void

  - Defined in src/data-structures/tree/tree.ts:38

### getHeight

- getHeight(): number

- #### Returns number

  - Defined in src/data-structures/tree/tree.ts:49

Generated using TypeDoc