Interface ICollection<T>
The simplest interface of a main stream generic collection with lookup, insertion and removal operations.
Inherited Members
Assembly: DistributedLucene.Net.dll
Syntax
public interface ICollection<T> : IExtensible<T>, ICollectionValue<T>, Collections.Generic.IEnumerable<T>, IShowable, IFormattable, Collections.Generic.ICollection<T>
Type Parameters
Name | Description |
---|---|
T |
Properties
Name | Description |
---|---|
ContainsSpeed | The value is symbolic indicating the type of asymptotic complexity in terms of the size of this collection (worst-case or amortized as relevant). See C5.Speed for the set of symbols. |
Count | |
IsReadOnly | If true any call of an updating operation will throw an
|
Methods
Name | Description |
---|---|
Add(T) | 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. |
Clear() | Remove all items from this collection. |
Contains(T) | Check if this collection contains (an item equivalent to according to the itemequalityComparer) a particular value. |
ContainsAll(Collections.Generic.IEnumerable<T>) | Check whether this collection contains all the values in another collection. If this collection has bag semantics ( )
the check is made with respect to multiplicities, else multiplicities
are not taken into account.
|
ContainsCount(T) | Count the number of items of the collection equal to a particular value. Returns 0 if and only if the value is not in the collection. |
CopyTo(T[], Int32) | Copy the items of this collection to a contiguous part of an array. |
Find(ref T) | Check if this collection contains an item equivalent according to the itemequalityComparer to a particular value. If so, return in the ref argument (a binary copy of) the actual value found. |
FindOrAdd(ref T) | Check if this collection contains an item equivalent according to the itemequalityComparer to a particular value. If so, return in the ref argument (a binary copy of) the actual value found. Else, add the item to the collection. |
GetUnsequencedHashCode() | The unordered collection hashcode is defined as the sum of over the items
of the collection, where the function is a function from
int to int of the form , where
the ax and bx are the same for all collection classes.
The current implementation uses fixed values for the ax and bx, specified as constants in the code. |
ItemMultiplicities() | |
Remove(T) | Remove a particular item from this collection. If the collection has bag semantics only one copy equivalent to the supplied item is removed. |
Remove(T, out T) | Remove a particular item from this collection if found. If the collection has bag semantics only one copy equivalent to the supplied item is removed, which one is implementation dependent. If an item was removed, report a binary copy of the actual item removed in the argument. |
RemoveAll(Collections.Generic.IEnumerable<T>) | Remove all items in another collection from this one. If this collection has bag semantics, take multiplicities into account. |
RemoveAllCopies(T) | Remove all items equivalent to a given value. |
RetainAll(Collections.Generic.IEnumerable<T>) | Remove all items not in some other collection from this one. If this collection has bag semantics, take multiplicities into account. |
UniqueItems() | |
UnsequencedEquals(ICollection<T>) | Compare the contents of this collection to another one without regards to the sequence order. The comparison will use this collection's itemequalityComparer to compare individual items. |
Update(T) | Check if this collection contains an item equivalent according to the itemequalityComparer to a particular value. If so, update the item in the collection with a (binary copy of) the supplied value. If the collection has bag semantics, it depends on the value of DuplicatesByCounting if this updates all equivalent copies in the collection or just one. |
Update(T, out T) | Check if this collection contains an item equivalent according to the itemequalityComparer to a particular value. If so, update the item in the collection with a (binary copy of) the supplied value. If the collection has bag semantics, it depends on the value of DuplicatesByCounting if this updates all equivalent copies in the collection or just one. |
UpdateOrAdd(T) | Check if this collection contains an item equivalent according to the itemequalityComparer to a particular value. If so, update the item in the collection to with a binary copy of the supplied value; else add the value to the collection. |
UpdateOrAdd(T, out T) | Check if this collection contains an item equivalent according to the itemequalityComparer to a particular value. If so, update the item in the collection to with a binary copy of the supplied value; else add the value to the collection. |