Click or drag to resize

PooledLinkedListT Class

A wrapper for LinkedListT that recycles its LinkedListNodeT instances to reduce GC allocations.
Inheritance Hierarchy
SystemObject
  Archon.SwissArmyLib.CollectionsPooledLinkedListT

Namespace:  Archon.SwissArmyLib.Collections
Assembly:  Archon.SwissArmyLib (in Archon.SwissArmyLib.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
public class PooledLinkedList<T> : ICollection<T>, 
	IEnumerable<T>, IEnumerable
Request Example View Source

Type Parameters

T
Type of items the list should contain.

The PooledLinkedListT type exposes the following members.

Constructors
  NameDescription
Public methodPooledLinkedListT
Initializes a new empty PooledLinkedList<T> with its own node pool.
Public methodPooledLinkedListT(IEnumerableT)
Initializes a new PooledLinkedList<T> with its own node pool and the contents of the specified IEnumerableT.
Public methodPooledLinkedListT(IPoolLinkedListNodeT)
Initializes a new empty PooledLinkedList<T> that uses a specified node pool.
Public methodPooledLinkedListT(IEnumerableT, IPoolLinkedListNodeT)
Initializes a new PooledLinkedList<T> with a custom node pool and the contents of the specified IEnumerableT.
Top
Properties
  NameDescription
Public propertyBackingList
Gets the LinkedListT instance that is wrapped.
Public propertyCount
Gets the number of nodes contained in the PooledLinkedList<T>.
Public propertyFirst
Gets the first node of the PooledLinkedList<T>.
Public propertyLast
Gets the last node of the PooledLinkedList<T>.
Public propertyPool
Gets the object pool used for storing unused nodes.
Top
Methods
  NameDescription
Public methodAddAfter(LinkedListNodeT, LinkedListNodeT)
Adds the specified new node after the specified existing node in the PooledLinkedList<T>.
Public methodAddAfter(LinkedListNodeT, T)
Adds a new node containing the specified value after the specified existing node in the PooledLinkedList<T>.
Public methodAddBefore(LinkedListNodeT, LinkedListNodeT)
Adds the specified new node before the specified existing node in the PooledLinkedList<T>.
Public methodAddBefore(LinkedListNodeT, T)
Adds a new node containing the specified value before the specified existing node in the PooledLinkedList<T>.
Public methodAddFirst(LinkedListNodeT)
Adds the specified new node at the start of the PooledLinkedList<T>.
Public methodAddFirst(T)
Adds a new node containing the specified value at the start of the PooledLinkedList<T>.
Public methodAddLast(LinkedListNodeT)
Adds the specified new node at the end of the PooledLinkedList<T>.
Public methodAddLast(T)
Adds a new node containing the specified value at the end of the PooledLinkedList<T>.
Public methodClear
Removes all nodes from the PooledLinkedList<T>.
Public methodContains
Determines whether a value is in the PooledLinkedList<T>.
Public methodCopyTo
Copies the entire PooledLinkedList<T> to a compatible one-dimensional Array, starting at the specified index of the target array.
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodFind
Finds the first node that contains the specified value.
Public methodFindLast
Finds the last node that contains the specified value.
Public methodGetEnumerator
Returns an enumerator that iterates through the PooledLinkedList<T>.
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodRemove(LinkedListNodeT)
Removes the specified node from the PooledLinkedList<T>.
Public methodRemove(T)
Removes the first occurrence of the specified value from the PooledLinkedList<T>.
Public methodRemoveFirst
Removes the node at the start of the PooledLinkedList<T>.
Public methodRemoveLast
Removes the node at the end of the PooledLinkedList<T>.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
See Also