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.IExtensible< T > Interface Template Reference

A generic collection to which one may add items. This is just the intersection of the main stream generic collection interfaces and the priority queue interface, T:C5.ICollection`1 and T:C5.IPriorityQueue`1. More...

Inheritance diagram for C5.IExtensible< T >:
C5.ICollectionValue< T > C5.IShowable C5.ICollection< T > C5.IPriorityQueue< T > C5.GuardedCollection< T > C5.HashBag< T > C5.HashSet< T > C5.ISequenced< T > C5.IntervalHeap< T > C5.GuardedSequenced< T > C5.GuardedSequenced< T > C5.IIndexed< T > C5.ISorted< T > C5.GuardedList< T > C5.GuardedSorted< T > C5.GuardedList< T > C5.GuardedSorted< T > C5.IIndexedSorted< T > C5.IList< T > C5.GuardedSorted< T > C5.IIndexedSorted< T > C5.IPersistentSorted< T >

Public Member Functions

bool Add (T item)
 Add an item to this collection if possible. If this collection has set semantics, the item will be added if not already in the collection. If bag semantics, the item will always be added. More...
 
void AddAll (SCG.IEnumerable< T > items)
 Add the elements from another collection with a more specialized item type to this collection. If this collection has set semantics, only items not already in the collection will be added. More...
 
bool Check ()
 Check the integrity of the internal data structures of this collection. This is only relevant for developers of the library 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...
 

Properties

bool IsReadOnly [get]
 If true any call of an updating operation will throw an More...
 
bool AllowsDuplicates [get]
 
SCG.IEqualityComparer< T > EqualityComparer [get]
 (Here should be a discussion of the role of equalityComparers. Any ). More...
 
bool DuplicatesByCounting [get]
 By convention this is true for any collection with set semantics. More...
 
- 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...
 

Additional Inherited Members

- 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 generic collection to which one may add items. This is just the intersection of the main stream generic collection interfaces and the priority queue interface, T:C5.ICollection`1 and T:C5.IPriorityQueue`1.

Member Function Documentation

bool C5.IExtensible< T >.Add ( item)

Add an item to this collection if possible. If this collection has set semantics, the item will be added if not already in the collection. If bag semantics, the item will always be added.

Parameters
itemThe item to add.
Returns
True if item was added.

Implemented in C5.HashedLinkedList< T >, C5.LinkedList< T >, C5.HashedArrayList< T >, C5.ArrayList< T >, C5.SortedArray< T >, C5.TreeBag< T >, C5.TreeSet< T >, C5.IList< T >, C5.GuardedCollection< T >, C5.HashSet< T >, C5.WrappedArray< T >, C5.HashBag< T >, C5.IntervalHeap< T >, and C5.ICollection< T >.

void C5.IExtensible< T >.AddAll ( SCG.IEnumerable< T >  items)

Add the elements from another collection with a more specialized item type to this collection. If this collection has set semantics, only items not already in the collection will be added.

Parameters
itemsThe items to add

Implemented in C5.HashedLinkedList< T >, C5.LinkedList< T >, C5.HashedArrayList< T >, C5.ArrayList< T >, C5.SortedArray< T >, C5.TreeBag< T >, C5.TreeSet< T >, C5.HashSet< T >, C5.GuardedCollection< T >, C5.WrappedArray< T >, C5.HashBag< T >, and C5.IntervalHeap< T >.

bool C5.IExtensible< T >.Check ( )

Check the integrity of the internal data structures of this collection. This is only relevant for developers of the library

Returns
True if check was passed.

Implemented in C5.TreeBag< T >, C5.TreeSet< T >, C5.HashedLinkedList< T >, C5.LinkedList< T >, C5.HashedArrayList< T >, C5.ArrayList< T >, C5.SortedArray< T >, C5.HashSet< T >, C5.GuardedCollection< T >, C5.HashBag< T >, C5.IntervalHeap< T >, and C5.WrappedArray< T >.

Property Documentation

bool C5.IExtensible< T >.AllowsDuplicates
get

False if this collection has set semantics, true if bag semantics.

bool C5.IExtensible< T >.DuplicatesByCounting
get

By convention this is true for any collection with set semantics.

True if only one representative of a group of equal items is kept in the collection together with the total count.

SCG.IEqualityComparer<T> C5.IExtensible< T >.EqualityComparer
get

(Here should be a discussion of the role of equalityComparers. Any ).

The equalityComparer used by this collection to check equality of items. Or null (????) if collection does not check equality at all or uses a comparer.

bool C5.IExtensible< T >.IsReadOnly
get

If true any call of an updating operation will throw an

ReadOnlyCollectionException

True if this collection is read-only.


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