Skip to content
On this page

LinkedList<T>.insertAfter

Overloads

VariantDefinition
insertAfter(node: LinkedListNode<T>, newNode: T): voidAdds a new value after an existing node in the LinkedList<T>.
insertAfter(node: LinkedListNode<T>, newNode: LinkedListNode<T>): voidAdds a new node or after an existing node in the LinkedList<T>.

insertAfter(node: LinkedListNode<T>, newNode: T): void

Adds a new value after an existing node in the LinkedList<T>.

Parameters

nodeLinkedListNode<T>: The LinkedListNode<T> after which to insert newNode.

newNodeT: The new value to add to the LinkedList<T>.

insertAfter(node: LinkedListNode<T>, newNode: LinkedListNode<T>): void

Adds a new node or after an existing node in the LinkedList<T>.

Parameters

nodeLinkedListNode<T>: The LinkedListNode<T> after which to insert newNode.

newNodeLinkedListNode<T>: The new LinkedListNode<T> or value to add to the LinkedList<T>.