Skip to content

Node

Defined in: node.ts:7

Represents a node in a bidirectional chain structure with optional child nodes. This node can be used to create various linked data structures.

Extended by

Type Parameters

Type ParameterDescription
TThe type of value stored in the node.

Constructors

Constructor

new Node<T>(): Node<T>

Defined in: node.ts:24

Creates a new Node instance. Initializes value, next, and prev properties to null.

Returns

Node<T>

Properties

next

next: null | Node<T>

Defined in: node.ts:9

Reference to the next node in the sequence.


prev

prev: null | Node<T>

Defined in: node.ts:12

Reference to the previous node in the sequence.


value

value: null | T

Defined in: node.ts:15

The value stored in this node.

Accessors

siblings

Get Signature

get siblings(): Node<T>[]

Defined in: node.ts:63

Gets the siblings of this node.

Returns

Node<T>[]

An array of Node representing all subsequent nodes in the sequence.

Set Signature

set siblings(arr): void

Defined in: node.ts:47

Sets the siblings of this node. Establishes bidirectional links between adjacent nodes in the provided array.

Parameters
ParameterTypeDescription
arrNode<T>[]An array of Node to set as siblings.
Returns

void