C5  2.4
The C5 Generic Collection Library for C# and CLI is a comprehensive collection library supporting lists, sets, bags, dictionaries, priority queues, (FIFO) queues, and (LIFO) stacks. C5 runs on .NET 3.5+, Silverlight 5, Windows Phone 8, Xamarin.iOS, Xamarin.Android, and Mono.
C5.IDirectedCollectionValue< T > Interface Template Reference

A sized generic collection, that can be enumerated backwards. More...

Inheritance diagram for C5.IDirectedCollectionValue< T >:
C5.ICollectionValue< T > C5.IDirectedEnumerable< T > C5.IShowable C5.ArrayBase< T >.Range C5.DirectedCollectionBase< T > C5.DirectedCollectionValueBase< T > C5.GuardedDirectedCollectionValue< T > C5.IQueue< T > C5.ISequenced< T > C5.IStack< T > C5.SequencedBase< T >

Public Member Functions

new IDirectedCollectionValue< T > Backwards ()
 Create a collection containing the same items as this collection, but whose enumerator will enumerate the items backwards. The new collection will become invalid if the original is modified. Method typically used as in More...
 
bool FindLast (Func< T, bool > predicate, out T item)
 Check if there exists an item that satisfies a specific predicate in this collection and return the first one in enumeration order. More...
 
- Public Member Functions inherited from C5.ICollectionValue< T >
void CopyTo (T[] array, int index)
 Copy the items of this collection to a contiguous part of an array. More...
 
T[] ToArray ()
 Create an array with the items of this collection (in the same order as an enumerator would output them). More...
 
void Apply (Action< T > action)
 Apply a delegate to all items of this collection. More...
 
bool Exists (Func< T, bool > predicate)
 Check if there exists an item that satisfies a specific predicate in this collection. More...
 
bool Find (Func< T, bool > predicate, out T item)
 Check if there exists an item that satisfies a specific predicate in this collection and return the first one in enumeration order. More...
 
bool All (Func< T, bool > predicate)
 Check if all items in this collection satisfies a specific predicate. More...
 
Choose ()
 Choose some item of this collection. More...
 
SCG.IEnumerable< T > Filter (Func< T, bool > filter)
 Create an enumerable, enumerating the items of this collection that satisfies a certain condition. More...
 
- Public Member Functions inherited from C5.IShowable
bool Show (StringBuilder stringbuilder, ref int rest, IFormatProvider formatProvider)
 Format More...
 

Additional Inherited Members

- Properties inherited from C5.ICollectionValue< T >
EventTypeEnum ListenableEvents [get]
 A flag bitmap of the events subscribable to by this collection. More...
 
EventTypeEnum ActiveEvents [get]
 A flag bitmap of the events currently subscribed to by this collection. More...
 
bool IsEmpty [get]
 
int Count [get]
 
Speed CountSpeed [get]
 The value is symbolic indicating the type of asymptotic complexity in terms of the size of this collection (worst-case or amortized as relevant). More...
 
- Properties inherited from C5.IDirectedEnumerable< T >
EnumerationDirection Direction [get]
 
- Events inherited from C5.ICollectionValue< T >
CollectionChangedHandler< T > CollectionChanged
 The change event. Will be raised for every change operation on the collection. More...
 
CollectionClearedHandler< T > CollectionCleared
 The change event. Will be raised for every clear operation on the collection. More...
 
ItemsAddedHandler< T > ItemsAdded
 The item added event. Will be raised for every individual addition to the collection. More...
 
ItemInsertedHandler< T > ItemInserted
 The item inserted event. Will be raised for every individual insertion to the collection. More...
 
ItemsRemovedHandler< T > ItemsRemoved
 The item removed event. Will be raised for every individual removal from the collection. More...
 
ItemRemovedAtHandler< T > ItemRemovedAt
 The item removed at event. Will be raised for every individual removal at from the collection. More...
 

Detailed Description

A sized generic collection, that can be enumerated backwards.

Member Function Documentation

Create a collection containing the same items as this collection, but whose enumerator will enumerate the items backwards. The new collection will become invalid if the original is modified. Method typically used as in

foreach (T x in coll.Backwards()) {...}

Returns
The backwards collection.

Implements C5.IDirectedEnumerable< T >.

Implemented in C5.TreeBag< T >, C5.TreeSet< T >, C5.HashedLinkedList< T >, C5.LinkedList< T >, C5.ArrayBase< T >.Range, C5.ArrayBase< T >, C5.DirectedCollectionBase< T >, C5.GuardedSequenced< T >, C5.WrappedArray< T >, C5.DirectedCollectionValueBase< T >, C5.GuardedDirectedCollectionValue< T >, and C5.CircularQueue< T >.

bool C5.IDirectedCollectionValue< T >.FindLast ( Func< T, bool >  predicate,
out T  item 
)

Check if there exists an item that satisfies a specific predicate in this collection and return the first one in enumeration order.

Parameters
predicateA delegate (T:Func`2 with
R == bool
) defining the predicate
item
Returns
True is such an item exists

Implemented in C5.DirectedCollectionBase< T >, C5.GuardedSequenced< T >, C5.WrappedArray< T >, C5.DirectedCollectionValueBase< T >, and C5.GuardedDirectedCollectionValue< T >.


The documentation for this interface was generated from the following file: