Class GuardedIndexedSorted<T>

Read-only wrapper for indexed sorted collections Suitable for wrapping TreeSet, TreeBag and SortedArray

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>, IIndexed<T>, IIndexedSorted<T>, ISequenced<T>, IShowable, ISorted<T>

Bases

object, GuardedEnumerable<T>, GuardedCollectionValue<T>, GuardedCollection<T>, GuardedSequenced<T>, GuardedSorted<T>

Event overview

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

Property overview

ActiveEvents, Inherited from GuardedCollectionValue<T> ,
AllowsDuplicates, Inherited from GuardedCollection<T> ,
Comparer, Inherited from GuardedSorted<T> ,
ContainsSpeed, Inherited from GuardedCollection<T> ,
Count, Inherited from GuardedCollectionValue<T> ,
CountSpeed, Inherited from GuardedCollectionValue<T> ,
Direction, Inherited from GuardedSequenced<T> ,
DuplicatesByCounting, Inherited from GuardedCollection<T> ,
EqualityComparer, Inherited from GuardedCollection<T> ,
IndexingSpeed ,
IsEmpty, Inherited from GuardedCollection<T> ,
IsReadOnly, Inherited from GuardedCollection<T> ,
this[int i] ,
this[int start, int end] ,
ListenableEvents, Inherited from GuardedCollectionValue<T>

Constructor overview

GuardedIndexedSorted<T>(IIndexedSorted<T> list)

Method overview

Add(T item), Inherited from GuardedCollection<T> ,
AddAll<U>(IEnumerable<U> items), Inherited from GuardedCollection<T> ,
AddSorted<U>(IEnumerable<U> items), Inherited from GuardedSorted<T> ,
All(Fun<T,bool> filter), Inherited from GuardedCollectionValue<T> ,
Apply(Act<T> a), Inherited from GuardedCollectionValue<T> ,
Backwards(), Inherited from GuardedSequenced<T> ,
Check(), Inherited from GuardedCollection<T> ,
Choose(), Inherited from GuardedCollectionValue<T> ,
Clear(), Inherited from GuardedCollection<T> ,
Clone() ,
Contains(T item), Inherited from GuardedCollection<T> ,
ContainsAll<U>(IEnumerable<U> items), Inherited from GuardedCollection<T> ,
ContainsCount(T item), Inherited from GuardedCollection<T> ,
CopyTo(T[] a, int i), Inherited from GuardedCollectionValue<T> ,
CountFrom(T bot) ,
CountFromTo(T bot, T top) ,
CountTo(T top) ,
Cut(System.IComparable<T> c, out T low, out bool lval, out T high, out bool hval), Inherited from GuardedSorted<T> ,
DeleteMax(), Inherited from GuardedSorted<T> ,
DeleteMin(), Inherited from GuardedSorted<T> ,
Equals(object obj), Inherited from object ,
Exists(Fun<T,bool> filter), Inherited from GuardedCollectionValue<T> ,
Filter(Fun<T,bool> filter), Inherited from GuardedCollectionValue<T> ,
Finalize(), Inherited from object ,
Find(ref T item), Inherited from GuardedCollection<T> ,
Find(Fun<T,bool> filter, out T item), Inherited from GuardedCollectionValue<T> ,
FindAll(Fun<T,bool> f) ,
FindIndex(Fun<T,bool> predicate), Inherited from GuardedSequenced<T> ,
FindLast(Fun<T,bool> predicate, out T item), Inherited from GuardedSequenced<T> ,
FindLastIndex(Fun<T,bool> predicate), Inherited from GuardedSequenced<T> ,
FindMax(), Inherited from GuardedSorted<T> ,
FindMin(), Inherited from GuardedSorted<T> ,
FindOrAdd(ref T item), Inherited from GuardedCollection<T> ,
GetEnumerator(), Inherited from GuardedEnumerable<T> ,
GetHashCode(), Inherited from object ,
GetSequencedHashCode(), Inherited from GuardedSequenced<T> ,
GetType(), Inherited from object ,
GetUnsequencedHashCode(), Inherited from GuardedCollection<T> ,
IndexOf(T item) ,
ItemMultiplicities(), Inherited from GuardedCollection<T> ,
LastIndexOf(T item) ,
Map<V>(Fun<T,V> m, System.Collections.Generic.IComparer<V> c) ,
MemberwiseClone(), Inherited from object ,
Predecessor(T item), Inherited from GuardedSorted<T> ,
RangeAll(), Inherited from GuardedSorted<T> ,
RangeFrom(T bot) ,
RangeFrom(T bot), Inherited from GuardedSorted<T> ,
RangeFromTo(T bot, T top) ,
RangeFromTo(T bot, T top), Inherited from GuardedSorted<T> ,
RangeTo(T top) ,
RangeTo(T top), Inherited from GuardedSorted<T> ,
Remove(T item), Inherited from GuardedCollection<T> ,
Remove(T item, out T removeditem), Inherited from GuardedCollection<T> ,
RemoveAll<U>(IEnumerable<U> items), Inherited from GuardedCollection<T> ,
RemoveAllCopies(T item), Inherited from GuardedCollection<T> ,
RemoveAt(int i) ,
RemoveInterval(int start, int count) ,
RemoveRangeFrom(T low), Inherited from GuardedSorted<T> ,
RemoveRangeFromTo(T low, T hi), Inherited from GuardedSorted<T> ,
RemoveRangeTo(T hi), Inherited from GuardedSorted<T> ,
RetainAll<U>(IEnumerable<U> items), Inherited from GuardedCollection<T> ,
SequencedEquals(ISequenced<T> that), Inherited from GuardedSequenced<T> ,
Show(System.Text.StringBuilder stringbuilder, ref int rest, System.IFormatProvider formatProvider), Inherited from GuardedCollectionValue<T> ,
Successor(T item), Inherited from GuardedSorted<T> ,
ToArray(), Inherited from GuardedCollectionValue<T> ,
ToString(string format, System.IFormatProvider formatProvider), Inherited from GuardedCollectionValue<T> ,
ToString(), Inherited from object ,
TryPredecessor(T item, out T res), Inherited from GuardedSorted<T> ,
TrySuccessor(T item, out T res), Inherited from GuardedSorted<T> ,
TryWeakPredecessor(T item, out T res), Inherited from GuardedSorted<T> ,
TryWeakSuccessor(T item, out T res), Inherited from GuardedSorted<T> ,
UniqueItems(), Inherited from GuardedCollection<T> ,
UnsequencedEquals(ICollection<T> that), Inherited from GuardedCollection<T> ,
Update(T item), Inherited from GuardedCollection<T> ,
Update(T item, out T olditem), Inherited from GuardedCollection<T> ,
UpdateOrAdd(T item), Inherited from GuardedCollection<T> ,
UpdateOrAdd(T item, out T olditem), Inherited from GuardedCollection<T> ,
WeakPredecessor(T item), Inherited from GuardedSorted<T> ,
WeakSuccessor(T item), Inherited from GuardedSorted<T>

Property details

Speed IndexingSpeedAccess: Read-Only

Value:

F T this[int i]Access: Read-Only

Value:The i'th item of the wrapped sorted collection

F IDirectedCollectionValue<T> this[int start, int end]Access: Read-Only

Value:A directed collection of the items in the indicated interval of the wrapped collection

Constructor details

GuardedIndexedSorted<T>(IIndexedSorted<T> list) Wrap an indexed sorted collection in a read-only wrapper
Parameters:
list:the indexed sorted collection

Method details

object Clone()
Returns:
F int CountFrom(T bot) Report the number of items in the specified range of the wrapped collection
Returns:
Parameters:
bot:
F int CountFromTo(T bot, T top) Report the number of items in the specified range of the wrapped collection
Returns:
Parameters:
bot:
top:
F int CountTo(T top) Report the number of items in the specified range of the wrapped collection
Returns:
Parameters:
top:
F IIndexedSorted<T> FindAll(Fun<T,bool> f) Run FindAll on the wrapped collection with the indicated filter. The result will not be read-only.
Returns:
Parameters:
f:
F int IndexOf(T item) Find the (first) index of an item in the wrapped collection
Returns:
Parameters:
item:
F int LastIndexOf(T item) Find the last index of an item in the wrapped collection
Returns:
Parameters:
item:
F IIndexedSorted<V> Map<V>(Fun<T,V> m, System.Collections.Generic.IComparer<V> c) Run Map on the wrapped collection with the indicated mapper. The result will not be read-only.
Returns:
Parameters:
m:
c:The comparer to use in the result
F IDirectedCollectionValue<T> RangeFrom(T bot) Get the specified range from the wrapped collection. (The current implementation erroneously does not wrap the result.)
Returns:
Parameters:
bot:
F IDirectedCollectionValue<T> RangeFromTo(T bot, T top) Get the specified range from the wrapped collection. (The current implementation erroneously does not wrap the result.)
Returns:
Parameters:
bot:
top:
F IDirectedCollectionValue<T> RangeTo(T top) Get the specified range from the wrapped collection. (The current implementation erroneously does not wrap the result.)
Returns:
Parameters:
top:
F T RemoveAt(int i)
Throws
ReadOnlyCollectionException since this is a read-only wrappper
Returns:
Parameters:
i:
F void RemoveInterval(int start, int count)
Throws
ReadOnlyCollectionException since this is a read-only wrappper
Parameters:
start:
count: