Skip to content
On this page

LinkedListNode<T>

A node in a doubly linked list.

Constructors

OverloadDescription
new LinkedListNode(value: T, _list: LinkedList<T>, _next: null | LinkedListNode<T>, _prev: null | LinkedListNode<T>, _listId: null | Symbol): LinkedListNode<T>

Properties

NameDescription
list
nextThe next node in the list.
prevThe previous node in the list.

Methods

NameDescription
attachNext(node: LinkedListNode<T>): voidAttaches a node to the next position.
attachPrev(node: LinkedListNode<T>): voidAttaches a node to the previous position.
detach(): voidDetaches the node from its list.
hasEqualList(id: Symbol): booleanchecks if node is in the same list with provided id.
hasList(): booleanchecks if node is in a list.
isEqual(node: LinkedListNode<any>): booleanchecks if the node is equal to another node.