|
Enhanced C#
Language of your choice: library documentation
|
A dictionary with weak keys. More...
A dictionary with weak keys.
Original source: datavault project. License: Apache License 2.0
| TKey | : | class |
Properties | |
| override int | Count [get] |
| Number of items in the collection. More... | |
Properties inherited from Loyc.Collections.Impl.DictionaryBase< TKey, TValue > | |
| abstract int | Count [get] |
| bool | IsReadOnly [get] |
| ICollection< TKey > | Keys [get] |
| ICollection< TValue > | Values [get] |
| TValue | this[TKey key] [get, set] |
Public Member Functions | |
| WeakKeyDictionary (int capacity) | |
| WeakKeyDictionary (IEqualityComparer< TKey > comparer) | |
| WeakKeyDictionary (int capacity, IEqualityComparer< TKey > comparer) | |
| override void | Add (TKey key, TValue value) |
| override bool | ContainsKey (TKey key) |
| override bool | Remove (TKey key) |
| override bool | TryGetValue (TKey key, out TValue value) |
| override void | Clear () |
| override IEnumerator< KeyValuePair< TKey, TValue > > | GetEnumerator () |
| void | RemoveCollectedEntries () |
Public Member Functions inherited from Loyc.Collections.Impl.DictionaryBase< TKey, TValue > | |
| void | Add (KeyValuePair< TKey, TValue > item) |
| bool | Contains (KeyValuePair< TKey, TValue > item) |
| void | CopyTo (KeyValuePair< TKey, TValue >[] array, int arrayIndex) |
| bool | Remove (KeyValuePair< TKey, TValue > item) |
Protected Member Functions | |
| override void | SetValue (TKey key, TValue value) |
| Implementation of the setter for this[]. More... | |
|
inlineprotectedvirtual |
Implementation of the setter for this[].
The setter alone (without the getter) is not allowed to be virtual in C# so a separate method is required.
Implements Loyc.Collections.Impl.DictionaryBase< TKey, TValue >.
|
get |
Number of items in the collection.
WARNING: The count returned here may include entries for which key value objects have already been garbage collected. Call RemoveCollectedEntries to weed out collected entries and update the count accordingly.
1.8.17