/// <summary>Prepends an AList to this list in sublinear time.</summary> /// <param name="other">A list of items to be added to the front of this list (at index 0).</param> /// <inheritdoc cref="Append(AList{T}, bool)"/> public virtual void Prepend(AList <T> other, bool move) { Combine(other, move, false); }
public void AddRange(AList <T> source) { InsertRange(Count, source); }
/// <summary>Appends another AList to this list in sublinear time.</summary> /// <param name="other">A list of items to be added to this list.</param> /// <param name="move">If this parameter is true, items from the other list /// are transferred to this list, causing the other list to be cleared. /// This parameter does not affect the speed of this method itself, but /// if you use "true" then future modifications to the combined list may /// be faster. If this parameter is "false" then it will be necessary to /// freeze the contents of the other list so that both lists can share /// the same tree nodes. Using "true" instead avoids the freeze operation, /// which in turn avoids the performance penalty on future modifications. /// <remarks> /// The default value of the 'move' parameter is false. /// <para/> /// When the 'source' list is short, this method doesn't perform /// any better than a standard AddRange() operation (in fact, the operation /// is delegated to <see cref="InsertRange"/>()). However, when 'source' /// has several hundred or thousand items, the append/prepend operation is /// performed in roughly O(log N) time where N is the combined list size. /// <para/> /// Parts of the tree that end up shared between this list and the other /// list will be frozen. Frozen parts of the tree must be cloned in order /// to be modified, which will slow down future operations on the tree. /// In order to avoid this problem, use move semantics (which clears the /// other list). /// </remarks> public virtual void Append(AList <T> other, bool move) { Combine(other, move, true); }
/// <summary>Prepends an AList to this list in sublinear time.</summary> /// <param name="other">A list of items to be added to the front of this list (at index 0).</param> /// <inheritdoc cref="Append(AList{T}, bool)"/> public virtual void Prepend(AList <T> other) { Combine(other, false, false); }
/// <inheritdoc cref="Append(AList{T}, bool)"/> public virtual void Append(AList <T> other) { Combine(other, false, true); }
/// <summary>Swaps the contents of two <see cref="AList{T}"/>s in O(1) time.</summary> /// <remarks>Any observers are also swapped.</remarks> public void Swap(AList <T> other) { base.SwapHelper(other, true); }
public void InsertRange(int index, AList <T> source, bool move) { base.InsertRange(index, source, move); }
public void InsertRange(int index, AList <T> source) { InsertRange(index, source, false); }
public AList(AList <T> items, bool keepListChangingHandlers) : base(items, keepListChangingHandlers) { }