Interface IExtensible<T>

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, ICollection<T> and IPriorityQueue<T>.

Implements

IEnumerable<T>, System.Collections.IEnumerable, System.IFormattable, System.ICloneable, ICollectionValue<T>, IShowable

Implemented by

ArrayList<T>, GuardedCollection<T>, GuardedIndexedSorted<T>, GuardedList<T>, GuardedSequenced<T>, GuardedSorted<T>, HashBag<T>, HashedArrayList<T>, HashedLinkedList<T>, HashSet<T>, IntervalHeap<T>, LinkedList<T>, SortedArray<T>, TreeBag<T>, TreeSet<T>, WrappedArray<T>

Super

ICollection<T>, IIndexed<T>, IIndexedSorted<T>, IList<T>, IPersistentSorted<T>, IPriorityQueue<T>, ISequenced<T>, ISorted<T>

Property overview

AllowsDuplicates ,
DuplicatesByCounting ,
EqualityComparer ,
IsReadOnly

Method overview

Add(T item) ,
AddAll<U>(IEnumerable<U> items) ,
Check()

Property details

A bool AllowsDuplicatesAccess: Read-Only

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

A bool DuplicatesByCountingAccess: Read-Only

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

By convention this is true for any collection with set semantics.
A System.Collections.Generic.IEqualityComparer<T> EqualityComparerAccess: Read-Only

Value: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.

(Here should be a discussion of the role of equalityComparers. Any ).
A bool IsReadOnlyAccess: Read-Only

Value:True if this collection is read-only.

If true any call of an updating operation will throw an ReadOnlyCollectionException

Method details

A 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.
Returns:True if item was added.
Parameters:
item:The item to add.
A void AddAll<U>(IEnumerable<U> 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.
Type parameters:
UThe type of items to add
Constraints:
U : T
Parameters:
items:The items to add
A bool 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.