ILinkedList<T>.AddBefore Method
Overloads
| AddBefore(TLinkedListNode<T>, TLinkedListNode<T>) |
Adds the specified new node before the specified existing node in the ILinkedList<T> . |
| AddBefore(TLinkedListNode<T>, T) |
Adds a new node containing the specified value before the specified existing node in the ILinkedList<T> . |
Adds the specified new node before the specified existing node in the ILinkedList<T> .
procedure AddBefore(const node: TLinkedListNode<T>; const newNode: TLinkedListNode<T>)
Parameters
- node
- TLinkedListNode<T>
The TLinkedListNode<T> before
which to insert newNode .
- newNode
- TLinkedListNode<T>
The new TLinkedListNode<T> to add to the ILinkedList<T> .
Exceptions
node is nil .
-or- newNode
is nil .
node is not in the current ILinkedList<T>
.
-or- newNode belongs to another ILinkedList<T>
.
Adds a new node containing the specified value before the specified existing node in the ILinkedList<T> .
function AddBefore(const node: TLinkedListNode<T>; const value: T): TLinkedListNode<T>
Parameters
- node
- TLinkedListNode<T>
The TLinkedListNode<T> before
which to insert a new TLinkedListNode<T>
containing value .
- value
- T
The value to add to the ILinkedList<T> .
Returns
The new TLinkedListNode<T>
containing value .
Exceptions
node is nil .
node is not in the current ILinkedList<T>
.