An object which represents a node in a linked list.

Notes

User code will not create linked list nodes directly. Nodes are created automatically when values are added to a list.

interface INode<T> {
    list: null | LinkedList<T>;
    next: null | INode<T>;
    prev: null | INode<T>;
    value: T;
}

Type Parameters

  • T

Properties

Properties

list: null | LinkedList<T>

The linked list which created and owns the node.

This will be null when the node is removed from the list.

next: null | INode<T>

The next node in the list.

This will be null when the node is the last node in the list or when the node is removed from the list.

prev: null | INode<T>

The previous node in the list.

This will be null when the node is the first node in the list or when the node is removed from the list.

value: T

The user value stored in the node.