LinkedListNode Class
Package: @esfx/collections-linkedlist
A node in a [doubly-linked list](https://en.wikipedia.org/wiki/Doubly_linked_list).
Declaration
export declare class LinkedListNode<T>
Constructors
constructor(value)
Constructs a new instance of the LinkedListNode
class
Declaration
constructor(value: T);
Parameters
- value
- T
Properties
[Symbol.toStringTag]
Declaration
[Symbol.toStringTag]: string;
Property Value
list
Gets the list associated with this node. If the node is not attached to a LinkedList, then this returns
undefined
.
Declaration
get list(): LinkedList<T> | undefined;
Property Value
next
Gets the LinkedListNode following this node in the list. If this is the last node in the list, or the
node is not attached to a LinkedList, then this returns undefined
.
Declaration
get next(): LinkedListNode<T> | undefined;
Property Value
previous
Gets the LinkedListNode preceding this node in the list. If this is the first node in the list, or the
node is not attached to a LinkedList, then this returns undefined
.
Declaration
get previous(): LinkedListNode<T> | undefined;
Property Value
value
The value for the node.
Declaration
value: T;
Property Value
Methods
detachSelf()
Removes this node from its associated list.
Declaration
detachSelf(): boolean;
Returns
true
if the node was successfully removed from the list; otherwise, false
.