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
Section titled “Extended by”Type Parameters
Section titled “Type Parameters”| Type Parameter | Description |
|---|---|
T | The type of value stored in the node. |
Constructors
Section titled “Constructors”Constructor
Section titled “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
Section titled “Returns”Node<T>
Properties
Section titled “Properties”next:
null|Node<T>
Defined in: node.ts:9
Reference to the next node in the sequence.
prev:
null|Node<T>
Defined in: node.ts:12
Reference to the previous node in the sequence.
value:
null|T
Defined in: node.ts:15
The value stored in this node.
Accessors
Section titled “Accessors”siblings
Section titled “siblings”Get Signature
Section titled “Get Signature”get siblings():
Node<T>[]
Defined in: node.ts:63
Gets the siblings of this node.
Returns
Section titled “Returns”Node<T>[]
An array of Node
Set Signature
Section titled “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
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
arr | Node<T>[] | An array of Node |
Returns
Section titled “Returns”void