ILinkedList<T>.AddFirst Method

Overloads

AddFirst(TLinkedListNode<T>)

Adds the specified new node at the start of the ILinkedList<T> .

AddFirst(T)

Adds a new node containing the specified value at the start of the ILinkedList<T> .

AddFirst(TLinkedListNode<T>)

Adds the specified new node at the start of the ILinkedList<T> .

Delphi
procedure AddFirst(const node: TLinkedListNode<T>)

Parameters

node
TLinkedListNode<T>

The new TLinkedListNode<T> to add at the start of the ILinkedList<T> .

Exceptions

node is nil .

node belongs to another ILinkedList<T> .

AddFirst(T)

Adds a new node containing the specified value at the start of the ILinkedList<T> .

Delphi
function AddFirst(const value: T): TLinkedListNode<T>

Parameters

value
T

The value to add at the start of the ILinkedList<T> .

Returns

TLinkedListNode<T>

The new TLinkedListNode<T> containing value .