A Speed ContainsSpeed | Access: Read-Only
Value:A characterization of the speed of lookup operations
(Contains() etc.) of the implementation of this dictionary.
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 Speed for the set of symbols. |
A System.Collections.Generic.IEqualityComparer<K> EqualityComparer | Access: Read-Only
Value:
The key equalityComparer.
|
A Fun<K,V> Fun | Access: Read-Only
Value:A delegate of type Fun<A1,R> defining the partial function from K to V give by the dictionary. |
A bool IsReadOnly | Access: Read-Only
Value:True if dictionary is read-only |
A V this[K key] | Access: Read-Write
Value:The value corresponding to the key
Indexer for dictionary.
|
A ICollectionValue<K> Keys | Access: Read-Only
Value:A collection containg the all the keys of the dictionary |
A ICollectionValue<V> Values | Access: Read-Only
Value:A collection containing all the values of the dictionary |
A void Add(K key, V val) |
Add a new (key, value) pair (a mapping) to the dictionary.
Parameters: | key: | Key to add | val: | Value to add |
|
A void AddAll<U,W>(System.Collections.Generic.IEnumerable<KeyValuePair<U,W>> entries) |
Add the entries from a collection of KeyValuePair<K,V> pairs to this dictionary.
|
A bool Check() |
Check the integrity of the internal data structures of this dictionary.
Only avaliable in DEBUG builds???
Returns: | True if check does not fail. |
|
A void Clear() |
Remove all entries from the dictionary
|
A bool Contains(K key) |
Check if there is an entry with a specified key
Returns: | True if key was found | Parameters: | key: | The key to look for |
|
A bool ContainsAll<H>(System.Collections.Generic.IEnumerable<H> items) |
Check whether this collection contains all the values in another collection.
If this collection has bag semantics (AllowsDuplicates==true )
the check is made with respect to multiplicities, else multiplicities
are not taken into account.
Returns: | True if all values in items is in this collection. | Parameters: | items: | The |
|
A bool Find(K key, out V val) |
Check if there is an entry with a specified key and report the corresponding
value if found. This can be seen as a safe form of "val = this[key]".
Returns: | True if key was found | Parameters: | key: | The key to look for | val: | On exit, the value of the entry |
|
A bool Find(ref K key, out V val) |
Check if there is an entry with a specified key and report the corresponding
value if found. This can be seen as a safe form of "val = this[key]".
Returns: | True if key was found | Parameters: | key: | The key to look for | val: | On exit, the value of the entry |
|
A bool FindOrAdd(K key, ref V val) |
Look for a specific key in the dictionary. If found, report the corresponding value,
else add an entry with the key and the supplied value.
Returns: | True if key was found | Parameters: | key: | The key to look for | val: | On entry the value to add if the key is not found.
On exit the value found if any. |
|
A bool Remove(K key) |
Remove an entry with a given key from the dictionary
Returns: | True if an entry was found (and removed) | Parameters: | key: | The key of the entry to remove |
|
A bool Remove(K key, out V val) |
Remove an entry with a given key from the dictionary and report its value.
Returns: | True if an entry was found (and removed) | Parameters: | key: | The key of the entry to remove | val: | On exit, the value of the removed entry |
|
A bool Update(K key, V val) |
Look for a specific key in the dictionary and if found replace the value with a new one.
This can be seen as a non-adding version of "this[key] = val".
Returns: | True if key was found | Parameters: | key: | The key to look for | val: | The new value |
|
A bool Update(K key, V val, out V oldval) |
Look for a specific key in the dictionary and if found replace the value with a new one.
This can be seen as a non-adding version of "this[key] = val" reporting the old value.
Returns: | True if key was found | Parameters: | key: | The key to look for | val: | The new value | oldval: | The old value if any |
|
A bool UpdateOrAdd(K key, V val) |
Update value in dictionary corresponding to key if found, else add new entry.
More general than "this[key] = val;" by reporting if key was found.
Returns: | True if key was found and value updated. | Parameters: | key: | The key to look for | val: | The value to add or replace with. |
|
A bool UpdateOrAdd(K key, V val, out V oldval) |
Update value in dictionary corresponding to key if found, else add new entry.
More general than "this[key] = val;" by reporting if key was found.
Returns: | True if key was found and value updated. | Parameters: | key: | The key to look for | val: | The value to add or replace with. | oldval: | The old value if any |
|