Class ArrayBase<T>.Range

A helper class for defining results of interval queries on array based collections.

Implements

IEnumerable<T>, System.Collections.IEnumerable, System.IFormattable, ICollectionValue<T>, IDirectedCollectionValue<T>, IDirectedEnumerable<T>, IShowable

Bases

object, EnumerableBase<T>, CollectionValueBase<T>, DirectedCollectionValueBase<T>

Event overview

CollectionChanged, Inherited from CollectionValueBase<T> ,
CollectionCleared, Inherited from CollectionValueBase<T> ,
ItemInserted, Inherited from CollectionValueBase<T> ,
ItemRemovedAt, Inherited from CollectionValueBase<T> ,
ItemsAdded, Inherited from CollectionValueBase<T> ,
ItemsRemoved, Inherited from CollectionValueBase<T>

Property overview

ActiveEvents, Inherited from CollectionValueBase<T> ,
Count ,
CountSpeed ,
Direction ,
IsEmpty ,
ListenableEvents, Inherited from CollectionValueBase<T>

Constructor overview

ArrayBase<T>.Range(ArrayBase<T> thebase, int start, int count, bool forwards)

Method overview

All(Fun<T,bool> predicate), Inherited from CollectionValueBase<T> ,
Apply(Act<T> action), Inherited from CollectionValueBase<T> ,
Backwards() ,
Choose() ,
CopyTo(T[] array, int index), Inherited from CollectionValueBase<T> ,
Equals(object obj), Inherited from object ,
Exists(Fun<T,bool> predicate), Inherited from CollectionValueBase<T> ,
Filter(Fun<T,bool> predicate), Inherited from CollectionValueBase<T> ,
Finalize(), Inherited from object ,
Find(Fun<T,bool> predicate, out T item), Inherited from CollectionValueBase<T> ,
FindLast(Fun<T,bool> predicate, out T item), Inherited from DirectedCollectionValueBase<T> ,
GetEnumerator() ,
GetHashCode(), Inherited from object ,
GetType(), Inherited from object ,
MemberwiseClone(), Inherited from object ,
raiseCollectionChanged(), Inherited from CollectionValueBase<T> ,
raiseCollectionCleared(bool full, int count), Inherited from CollectionValueBase<T> ,
raiseCollectionCleared(bool full, int count, System.Nullable<int> offset), Inherited from CollectionValueBase<T> ,
raiseForAdd(T item), Inherited from CollectionValueBase<T> ,
raiseForInsert(int i, T item), Inherited from CollectionValueBase<T> ,
raiseForRemove(T item), Inherited from CollectionValueBase<T> ,
raiseForRemove(T item, int count), Inherited from CollectionValueBase<T> ,
raiseForRemoveAll(ICollectionValue<T> wasRemoved), Inherited from CollectionValueBase<T> ,
raiseForRemoveAt(int index, T item), Inherited from CollectionValueBase<T> ,
raiseForSetThis(int index, T value, T item), Inherited from CollectionValueBase<T> ,
raiseForUpdate(T newitem, T olditem), Inherited from CollectionValueBase<T> ,
raiseForUpdate(T newitem, T olditem, int count), Inherited from CollectionValueBase<T> ,
raiseItemInserted(T item, int index), Inherited from CollectionValueBase<T> ,
raiseItemRemovedAt(T item, int index), Inherited from CollectionValueBase<T> ,
raiseItemsAdded(T item, int count), Inherited from CollectionValueBase<T> ,
raiseItemsRemoved(T item, int count), Inherited from CollectionValueBase<T> ,
Show(System.Text.StringBuilder stringbuilder, ref int rest, System.IFormatProvider formatProvider), Inherited from CollectionValueBase<T> ,
ToArray(), Inherited from CollectionValueBase<T> ,
ToString(string format, System.IFormatProvider formatProvider), Inherited from CollectionValueBase<T> ,
ToString(), Inherited from CollectionValueBase<T>

Property details

Count property in this collection.

The value is symbolic indicating the type of asymptotic complexity in terms of the size of this collection (worst-case or amortized as relevant).
int CountAccess: Read-Only

Value:The number of items in the range

Throws
CollectionModifiedExceptionif underlying collection has been modified.
Speed CountSpeedAccess: Read-Only

Value:A characterization of the speed of the

CollectionModifiedExceptionif underlying collection has been modified.
EnumerationDirection DirectionAccess: Read-Only

Value:The enumeration direction relative to the original collection.

Forwards if same, else Backwards
Throws
CollectionModifiedExceptionif underlying collection has been modified.
bool IsEmptyAccess: Read-Only

Value:True if this collection is empty.

Throws
CollectionModifiedExceptionif underlying collection has been modified.

Constructor details

PArrayBase<T>.Range(ArrayBase<T> thebase, int start, int count, bool forwards)

Method details

IDirectedCollectionValue<T> Backwards() Create a araay collection range with the same contents as this one, but opposite enumeration sequence.
Throws
CollectionModifiedExceptionif underlying collection has been modified.
Returns:The mirrored collection.
T Choose() Choose some item of this collection.
Throws
CollectionModifiedExceptionif underlying collection has been modified.
NoSuchItemExceptionif range is empty.
Returns:
System.Collections.Generic.IEnumerator<T> GetEnumerator() Create an enumerator for this range of an array based collection.
Throws
CollectionModifiedExceptionif underlying collection has been modified.
Returns:The enumerator