RadLinkedList<T>
Represents a linked list collection that allows for efficient insertion and removal of elements.
Definition
Namespace:Telerik.Windows.Documents.DocumentStructure
Assembly:Telerik.Windows.Controls.RichTextBox.dll
Type Parameters:
T
Syntax:
public class RadLinkedList<T> : ICollection<T>, IEnumerable<T>, ICollection, IEnumerable
Inheritance: objectRadLinkedList<T>
Implements:
Constructors
public RadLinkedList()
Properties
Gets the number of elements contained in the RadLinkedList.
public int Count { get; }
The number of elements in the RadLinkedList.
Implements:
Gets the first node in the list.
public RadLinkedListNode<T> First { get; }
Gets a value indicating whether the linked list is empty.
public bool IsEmpty { get; }
Gets a value indicating whether the linked list is read-only.
public bool IsReadOnly { get; }
true if the linked list is read-only; otherwise, false.
Implements:
Gets the last node in the list.
public RadLinkedListNode<T> Last { get; }
Methods
Adds a new element of type T to the end of the linked list.
public void Add(T item)
The item to be added to the linked list.
Implements:
Inserts a new node after a specified existing node in the linked list.
public RadLinkedListNode<T> AddAfter(RadLinkedListNode<T> node, RadLinkedListNode<T> newNode)
The existing node after which the new node will be added.
newNodeRadLinkedListNode<T>The new node to be inserted into the linked list.
Returns:Returns the newly added node.
Adds a new node containing the specified value after the specified node in the linked list.
public RadLinkedListNode<T> AddAfter(RadLinkedListNode<T> node, T value)
The node after which the new value will be inserted.
valueTThe value to be added to the linked list.
Returns:Returns the newly added node.
Inserts a new node before the specified node in the linked list.
public RadLinkedListNode<T> AddBefore(RadLinkedListNode<T> node, RadLinkedListNode<T> newNode)
The node before which the new node will be inserted.
newNodeRadLinkedListNode<T>The new node to insert into the list.
Returns:Returns the newly added node if the insertion is successful; otherwise, returns null.
Inserts a new node containing the specified value before the specified existing node in the linked list.
public RadLinkedListNode<T> AddBefore(RadLinkedListNode<T> node, T value)
The existing node before which the new node will be inserted.
valueTThe value to be stored in the newly created node.
Returns:Returns the new node that has been added to the linked list.
Adds a new node containing the specified value to the start of the linked list.
public RadLinkedListNode<T> AddFirst(RadLinkedListNode<T> node)
The node to be added to the beginning of the linked list.
Returns:Returns the new node that has been added to the linked list.
Adds a new element at the beginning of the linked list.
public RadLinkedListNode<T> AddFirst(T value)
The item to be added to the beginning of the linked list.
Returns:Returns the new node that has been added to the linked list.
Adds a new node containing the specified value to the end of the linked list.
public RadLinkedListNode<T> AddLast(RadLinkedListNode<T> node)
The node to be added to the end of the linked list.
Returns:Returns the new node that has been added to the linked list.
Adds a new element to the end of the linked list.
public RadLinkedListNode<T> AddLast(T value)
The value to be added to the end of the linked list.
Returns:Returns the new node that has been added to the linked list.
Adds a range of nodes after a specified node in the linked list.
public void AddRangeAfter(RadLinkedListNode<T> node, RadLinkedListNode<T> rangeStartNode, RadLinkedListNode<T> rangeEndNode)
The node after which the range will be added.
rangeStartNodeRadLinkedListNode<T>The node that marks the end of the range to be added.
rangeEndNodeRadLinkedListNode<T>The starting node of the range to be added.
Adds a range of nodes before a specified node in the linked list.
public void AddRangeBefore(RadLinkedListNode<T> node, RadLinkedListNode<T> rangeStartNode, RadLinkedListNode<T> rangeEndNode)
The starting node of the range to be added.
rangeStartNodeRadLinkedListNode<T>The ending node of the range to be added.
rangeEndNodeRadLinkedListNode<T>The node before which the range will be added.
Removes all elements from the linked list, resetting its count to zero.
public void Clear()
Implements:
After calling this method, the linked list will be empty, and any references to the removed elements will be discarded.
Determines whether the linked list contains a specific value.
public bool Contains(T item)
The value to locate in the linked list.
Returns:True if the linked list contains an element with the specified value; otherwise, false.
Implements:
Copies the elements of the linked list to an array, starting at a specified array index.
public void CopyTo(T[] array, int arrayIndex)
The one-dimensional array that is the destination of the elements copied from the linked list.
arrayIndexintThe zero-based index in the array at which copying begins.
Implements:
Provides an enumerator for iterating through the elements of the linked list.
public IEnumerator<T> GetEnumerator()
IEnumerator<T>
An enumerator that can be used to iterate through the linked list.
Implements:
Moves nodes from one linked list to another linked list.
public void MoveNodes(RadLinkedList<T> fromList, RadLinkedListNode<T> fromNode, RadLinkedListNode<T> toNode)
The linked list from which nodes will be moved.
fromNodeRadLinkedListNode<T>The node that will be moved from the source list.
toNodeRadLinkedListNode<T>The linked list to which the nodes will be moved.
Moves nodes from one linked list to another linked list.
public void MoveNodes(RadLinkedList<T> fromList, RadLinkedListNode<T> fromNode)
The source linked list from which nodes will be moved.
fromNodeRadLinkedListNode<T>The destination linked list to which nodes will be moved.
Removes the specified node from the linked list.
public void Remove(RadLinkedListNode<T> node)
The node to be removed from the linked list.
Removes the first occurrence of a specified object from the linked list.
public bool Remove(T item)
The object to remove from the linked list. The value can be null for reference types.
Returns:true if the object is successfully removed; otherwise, false. This method also returns false if the object was not found in the linked list.
Implements:
Removes the first element from the linked list.
public void RemoveFirst()
Removes the last element from the linked list.
public void RemoveLast()
Removes a range of nodes from the linked list, beginning at the specified start node and ending at the specified end node.
public void RemoveRange(RadLinkedListNode<T> rangeHead, RadLinkedListNode<T> rangeTail)
The starting node of the range to be removed.
rangeTailRadLinkedListNode<T>The ending node of the range to be removed.