Interface IIndexed<T>

A sequenced collection, where indices of items in the order are maintained

Implements

IEnumerable<T>, System.Collections.IEnumerable, System.IFormattable, System.ICloneable, System.Collections.Generic.ICollection<T>, ICollection<T>, ICollectionValue<T>, IDirectedCollectionValue<T>, IDirectedEnumerable<T>, IExtensible<T>, ISequenced<T>, IShowable

Implemented by

ArrayList<T>, GuardedIndexedSorted<T>, GuardedList<T>, HashedArrayList<T>, HashedLinkedList<T>, LinkedList<T>, SortedArray<T>, TreeBag<T>, TreeSet<T>, WrappedArray<T>

Super

IIndexedSorted<T>, IList<T>

Property overview

IndexingSpeed ,
this[int index] ,
this[int start, int count]

Method overview

FindIndex(Fun<T,bool> predicate) ,
FindLastIndex(Fun<T,bool> predicate) ,
IndexOf(T item) ,
LastIndexOf(T item) ,
RemoveAt(int index) ,
RemoveInterval(int start, int count)

Property details

A Speed IndexingSpeedAccess: Read-Only

Value:

A T this[int index]Access: Read-Only

Value:The index'th item of this list.

Throws
System.IndexOutOfRangeException if index is negative or >= the size of the collection.
Parameters:
index:the index to lookup
A IDirectedCollectionValue<T> this[int start, int count]Access: Read-Only

Value:The directed collection of items in a specific index interval.

Throws
System.ArgumentOutOfRangeException
Parameters:
start:The low index of the interval (inclusive).
count:The size of the range.

Method details

A int FindIndex(Fun<T,bool> predicate) Check if there exists an item that satisfies a specific predicate in this collection and return the index of the first one.
Returns:the index, if found, a negative value else
Parameters:
predicate:A delegate (Fun<A1,R> with R == bool) defining the predicate
A int FindLastIndex(Fun<T,bool> predicate) Check if there exists an item that satisfies a specific predicate in this collection and return the index of the last one.
Returns:the index, if found, a negative value else
Parameters:
predicate:A delegate (Fun<A1,R> with R == bool) defining the predicate
A int IndexOf(T item) Searches for an item in the list going forwards from the start.
Returns:Index of item from start. A negative number if item not found, namely the one's complement of the index at which the Add operation would put the item.
Parameters:
item:Item to search for.
A int LastIndexOf(T item) Searches for an item in the list going backwards from the end.
Returns:Index of of item from the end. A negative number if item not found, namely the two-complement of the index at which the Add operation would put the item.
Parameters:
item:Item to search for.
A T RemoveAt(int index) Remove the item at a specific position of the list.
Throws
System.IndexOutOfRangeException if index is negative or >= the size of the collection.
Returns:The removed item.
Parameters:
index:The index of the item to remove.
A void RemoveInterval(int start, int count) Remove all items in an index interval.
Throws
System.ArgumentOutOfRangeException if start or count is negative or start+count > the size of the collection.
Parameters:
start:The index of the first item to remove.
count:The number of items to remove.