Table of Contents

Class LinkedListWithPooledNodes<T>

Namespace
AlgorithmsSW.List
Assembly
AlgorithmsSW.dll
public class LinkedListWithPooledNodes<T> : IEnumerable<T?>, IEnumerable

Type Parameters

T
Inheritance
LinkedListWithPooledNodes<T>
Implements
Inherited Members
Extension Methods

Constructors

LinkedListWithPooledNodes(int)

public LinkedListWithPooledNodes(int capacity)

Parameters

capacity int

Properties

Count

public int Count { get; }

Property Value

int

First

public LinkedListWithPooledNodes<T>.Node First { get; }

Property Value

LinkedListWithPooledNodes<T>.Node

IsEmpty

public bool IsEmpty { get; }

Property Value

bool

IsSingleton

public bool IsSingleton { get; }

Property Value

bool

Last

public LinkedListWithPooledNodes<T>.Node Last { get; }

Property Value

LinkedListWithPooledNodes<T>.Node

Nodes

public IEnumerable<LinkedListWithPooledNodes<T>.Node> Nodes { get; }

Property Value

IEnumerable<LinkedListWithPooledNodes<T>.Node>

Methods

Clear()

public void Clear()

Concat(LinkedListWithPooledNodes<T>)

Concatenates the other list to the end of this list.

public void Concat(LinkedListWithPooledNodes<T> other)

Parameters

other LinkedListWithPooledNodes<T>

The list to concatenate to this list.

Remarks

The other list is cleared after this operation.

GetEnumerator()

Returns an enumerator that iterates through the collection.

public IEnumerator<T?> GetEnumerator()

Returns

IEnumerator<T>

An enumerator that can be used to iterate through the collection.

InsertAfter(Node, T)

public LinkedListWithPooledNodes<T>.Node InsertAfter(LinkedListWithPooledNodes<T>.Node node, T item)

Parameters

node LinkedListWithPooledNodes<T>.Node
item T

Returns

LinkedListWithPooledNodes<T>.Node

InsertAtBack(T)

public LinkedListWithPooledNodes<T>.Node InsertAtBack(T item)

Parameters

item T

Returns

LinkedListWithPooledNodes<T>.Node

InsertAtFront(T)

public LinkedListWithPooledNodes<T>.Node InsertAtFront(T item)

Parameters

item T

Returns

LinkedListWithPooledNodes<T>.Node

RemoveAfter(Node)

Removes the node after the specified node.

public void RemoveAfter(LinkedListWithPooledNodes<T>.Node node)

Parameters

node LinkedListWithPooledNodes<T>.Node

The node whose successor is to be removed.

Exceptions

ArgumentNullException

Thrown when the input node is null.

InvalidOperationException

Thrown when the input node does not have a successor to remove.

RemoveFromFront()

public void RemoveFromFront()

Reverse()

public void Reverse()

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.