Internal implementation class. Shared code of non-sparse AList leaf nodes.
|
| AListLeaf (ushort maxNodeSize) |
|
| AListLeaf (AListLeaf< K, T > original) |
|
override void | SetAt (uint index, T item, IAListTreeObserver< K, T > tob) |
| Sets an item at the specified sub-index. More...
|
|
override T | GetLastItem () |
| Gets the last item in the last leaf node (needed by B+ trees, but is also called by AListBase{K,T}.Last). More...
|
|
override bool | RemoveAt (uint index, uint count, IAListTreeObserver< K, T > tob) |
| Removes an item at the specified index. More...
|
|
override void | Freeze () |
|
void | Sort (int start, int subcount, Comparison< T > comp) |
|
int | IndexOf (T item, int startIndex) |
|
override uint | GetImmutableCount (bool _) |
| Diagnostic method. See AListBase{K,T}.GetImmutableCount(). More...
|
|
virtual AListNode< K, T > | Insert (uint index, T item, out AListNode< K, T > splitRight, IAListTreeObserver< K, T > tob) |
| Inserts an item at the specified index. This method can only be called for ALists, since other tree types don't allow insertion at a specific index. More...
|
|
virtual AListNode< K, T > | InsertRange (uint index, IListSource< T > source, ref int sourceIndex, out AListNode< K, T > splitRight, IAListTreeObserver< K, T > tob) |
| Inserts a list of items at the specified index. This method may not insert all items at once, so there is a sourceIndex parameter which points to the next item to be inserted. When sourceIndex reaches source.Count, the insertion is complete. More...
|
|
abstract AListNode< K, T > | DetachedClone () |
| Creates an unfrozen shallow duplicate copy of this node. The child nodes (if this is an inner node) are frozen so that they will require duplication if they are to be modified. The name "DetachedClone" is intended to emphasize that the AListNodeObserver (if any) is not notified, and the clone is effectively independent of the list that it came from. More...
|
|
abstract AListNode< K, T > | CopySection (uint index, uint count, AListBase< K, T > list) |
| Extracts and returns, as fast as possible, a subrange of the list that this node represents. More...
|
|
virtual uint | GetRealItemCount () |
| For sparse lists: counts the number of non-sparse items. More...
|
|
|
| AListLeaf (ushort maxNodeSize, InternalDList< T > list) |
|
IAListTreeObserver< K, T > | GetObserver (AListBase< K, T > tree) |
| Allows derived classes of AListNode to access AListBase._observer. More...
|
|
bool | HasListChanging (AListBase< K, T > tree) |
| Allows derived classes of AListNode to fire the AListBase.ListChanging event. More...
|
|
void | CallListChanging (AListBase< K, T > tree, ListChangeInfo< T > listChangeInfo) |
| Allows derived classes of AListNode to fire the AListBase.ListChanging event properly. More...
|
|
override bool Loyc.Collections.Impl.AListLeaf< K, T >.RemoveAt |
( |
uint |
index, |
|
|
uint |
count, |
|
|
IAListTreeObserver< K, T > |
tob |
|
) |
| |
|
inlinevirtual |
Removes an item at the specified index.
- Returns
- Returns true if the node is undersized after the removal, or if this is an organized tree and the removal caused the aggregate key (highest key in a B+tree) to change.
When the node is undersized, but is not the root node, the parent will shift an item from a sibling, or discard the node and redistribute its children among existing nodes. If it is the root node, it is only discarded if it is an inner node with a single child (the child becomes the new root node), or it is a leaf node with no children.
Implements Loyc.Collections.Impl.AListNode< K, T >.
Reimplemented in Loyc.Collections.Impl.BListLeaf< K, T >.