TLinkedList<T>.AddBefore(TLinkedListNode<T>,TLinkedListNode<T>) Method

Adds the specified new node before the specified existing node in the ILinkedList<T>.

Namespace: Spring.Collections.LinkedLists
public
 procedure AddBefore(const node: TLinkedListNode<T>; const newNode: TLinkedListNode<T>); overload;

Parameters

node
Type: TLinkedListNode<T>

The TLinkedListNode<T> before which to insert newNode.

newNode
Type: TLinkedListNode<T>

The new TLinkedListNode<T> to add to the ILinkedList<T>.

Implements

ILinkedList<T>.AddBefore(TLinkedListNode<T>,TLinkedListNode<T>)
Spring.EArgumentNullException

node is nil.

-or-

newNode is nil.

Spring.EInvalidOperationException

node is not in the current ILinkedList<T> .

-or-

newNode belongs to another ILinkedList<T> .