CompressingTreeList<(Of <(<'T>)>)> Class
NamespacesICSharpCode.AvalonEdit.UtilsCompressingTreeList<(Of <(<'T>)>)>
A IList{T} implementation that has efficient insertion and removal (in O(lg n) time) and that saves memory by allocating only one node when a value is repeated in adjacent indices. Based on this "compression", it also supports efficient InsertRange/SetRange/RemoveRange operations.
Declaration Syntax
C#Visual BasicVisual C++
public sealed class CompressingTreeList<T> : IList<T>, 
	ICollection<T>, IEnumerable<T>, IEnumerable
Public NotInheritable Class CompressingTreeList(Of T) _
	Implements IList(Of T), ICollection(Of T),  _
	IEnumerable(Of T), IEnumerable
generic<typename T>
public ref class CompressingTreeList sealed : IList<T>, 
	ICollection<T>, IEnumerable<T>, IEnumerable
Generic Template Parameters
All MembersConstructorsMethodsProperties

CompressingTreeList<(Of <(<'T>)>)>(IEqualityComparer<(Of <<'(T>)>>))
Creates a new CompressingTreeList instance.

CompressingTreeList<(Of <(<'T>)>)>(Func<(Of <<'(T, T, Boolean>)>>))
Creates a new CompressingTreeList instance.

Adds the specified item to the end of the list.

Removes all items from this list.

Gets whether this list contains the specified item.

CopyTo(array<T>[]()[][], Int32)
Copies all items in this list to the specified array.

Gets the number of items in the list.

Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Gets the first index after index so that the value at the result index is not equal to the value at index. That is, this method returns the exclusive end index of the run of equal values.

Gets an enumerator for this list.

Serves as a hash function for a particular type.
(Inherited from Object.)
GetRunLength(Int32) Obsolete.
Gets the number of elements after index that have the same value as each other.

Gets the the first index so that all values from the result index to index are equal.

Gets the Type of the current instance.
(Inherited from Object.)
Gets the index of the specified item.

Insert(Int32, T)
Inserts the specified item at index

InsertRange(Int32, Int32, T)
Inserts itemcount times at position index.

Item[([( Int32])])
Gets or sets an item by index.

Removes the specified item from this list.

Removes one item at index

RemoveRange(Int32, Int32)
Removes count items starting at position index.

SetRange(Int32, Int32, T)
Sets count indices starting at index to item

Returns a String that represents the current Object.
(Inherited from Object.)
Transform(Func<(Of <<'(T, T>)>>))
Applies the conversion function to all elements in this CompressingTreeList.

TransformRange(Int32, Int32, Func<(Of <<'(T, T>)>>))
Applies the conversion function to the elements in the specified range.

Current memory usage: 5*IntPtr.Size + 12 + sizeof(T) per node. Use this class only if lots of adjacent values are identical (can share one node).
Inheritance Hierarchy
CompressingTreeList<(Of <(<'T>)>)>

Assembly: ICSharpCode.AvalonEdit (Module: ICSharpCode.AvalonEdit.dll) Version: