|
Joutsen v0.5.0+12-g5dd5f7e
|
A map implementation that uses the hashes of keys to store and find items. More...
Public Member Functions | |
| Dictionary () | |
| Creates an empty dictionary. More... | |
| Dictionary (Mapping< KeyType, ValueType > map) | |
| Creates a new dictionary with predefined entries. More... | |
| Dictionary (SCG.IEqualityComparer< KeyType > keyComparer) | |
| Creates a new dictionary using a custom comparer to calculate hashes. More... | |
| Dictionary (int initialCapacity) | |
| Creates a new dictionary with a custom initial size of the hash table. More... | |
| Dictionary (Map< KeyType, ValueType > map, SCG.IEqualityComparer< KeyType > keyComparer) | |
| Creates a new dictionary using predefined initial items and a custom comparer to calculate hashes. More... | |
| Dictionary (int initialCapacity, SCG.IEqualityComparer< KeyType > keyComparer) | |
| Creates a new dictionary with a custom comparer to calculate hashes and a custom internal capacity. More... | |
| ValueType | GetValue (KeyType key, ValueType defaultValue) |
| Fetches the value associated with a key or a default value. More... | |
| void | Update (SCG.IEnumerable< SCG.KeyValuePair< KeyType, ValueType > > newValues) |
| Adds or updates values in the map. More... | |
| override String | ToString () |
Public Member Functions inherited from Joutsen.Collections.Generic.Map< KeyType, ValueType > | |
| void | Update (SCG.IEnumerable< SCG.KeyValuePair< KeyType, ValueType > > newValues) |
| Adds or updates values in the map. More... | |
| new bool | ContainsKey (KeyType key) |
| Checks if a key is part of the map. More... | |
Public Member Functions inherited from Joutsen.Collections.Generic.Collection< SCG.KeyValuePair< KeyType, ValueType > > | |
| bool | Contains (ItemType item, SCG.IEqualityComparer< ItemType > comparer) |
| Checks if an item is part of the collection. More... | |
| void | Add (SCG.IEnumerable< ItemType > items) |
| Adds multiple items to the collection. More... | |
Public Member Functions inherited from Joutsen.Collections.Generic.Mapping< KeyType, ValueType > | |
| bool | ContainsKey (KeyType key) |
| Checks if a key is part of the mapping. More... | |
| ValueType | GetValue (KeyType key, ValueType defaultValue) |
| Fetches the value associated with a key or a default value. More... | |
| bool | TryGetValue (KeyType key, out ValueType value) |
| Get a value if the key is part of the mapping. More... | |
Public Member Functions inherited from Joutsen.Collections.Generic.Indexable< KeyType, ValueType > | |
| IndexType | IndexOf (ItemType item) |
| Fetches the index of an itemin the list. More... | |
| IndexType | IndexOf (ItemType item, IEqualityComparer< ItemType > comparer) |
| Fetches the index of an item in the list using a custom comparer. More... | |
Additional Inherited Members | |
Properties inherited from Joutsen.Collections.Generic.Map< KeyType, ValueType > | |
| new ValueType | this[KeyType key] [get, set] |
| Fetches a or sets a value associated with a key. More... | |
| new int | Count [get] |
| Fetches the number of elements in the map. More... | |
| new SCG.IEnumerable< ValueType > | Values [get] |
| Fetches an iterator for the values in the mapping. More... | |
Properties inherited from Joutsen.Collections.Generic.Mapping< KeyType, ValueType > | |
| ValueType | this[KeyType key] [get] |
| Fetches a value associated with a key. More... | |
| IEnumerable< KeyType > | Keys [get] |
| Fetches an iterator for the keys in the mapping. More... | |
| IEnumerable< ValueType > | Values [get] |
| Fetches an iterator for the values in the mapping. More... | |
| int | Count [get] |
| Fetches the number of elements in the mapping. More... | |
Properties inherited from Joutsen.Collections.Generic.Indexable< KeyType, ValueType > | |
| int | Count [get] |
| Determines the number of values in the list. More... | |
| ItemType | this[IndexType index] [get] |
| Fetches the value associated with the index. More... | |
A map implementation that uses the hashes of keys to store and find items.
| Joutsen.Collections.Generic.Dictionary< KeyType, ValueType >.Dictionary | ( | ) |
Creates an empty dictionary.
| Joutsen.Collections.Generic.Dictionary< KeyType, ValueType >.Dictionary | ( | Mapping< KeyType, ValueType > | map | ) |
Creates a new dictionary with predefined entries.
| map | the predefined entries of the dictionary |
| Joutsen.Collections.Generic.Dictionary< KeyType, ValueType >.Dictionary | ( | SCG.IEqualityComparer< KeyType > | keyComparer | ) |
Creates a new dictionary using a custom comparer to calculate hashes.
| comparer | the custom comparer |
| Joutsen.Collections.Generic.Dictionary< KeyType, ValueType >.Dictionary | ( | int | initialCapacity | ) |
Creates a new dictionary with a custom initial size of the hash table.
| initialCapacity | the initial capacity of the internal hashtable |
| Joutsen.Collections.Generic.Dictionary< KeyType, ValueType >.Dictionary | ( | Map< KeyType, ValueType > | map, |
| SCG.IEqualityComparer< KeyType > | keyComparer | ||
| ) |
Creates a new dictionary using predefined initial items and a custom comparer to calculate hashes.
| map | the predefined entries of the dictionary |
| comparer | the custom comparer |
| Joutsen.Collections.Generic.Dictionary< KeyType, ValueType >.Dictionary | ( | int | initialCapacity, |
| SCG.IEqualityComparer< KeyType > | keyComparer | ||
| ) |
Creates a new dictionary with a custom comparer to calculate hashes and a custom internal capacity.
| initialCapacity | the initial capacity of the internal hashtable |
| comparer | the custom comparer |
| ValueType Joutsen.Collections.Generic.Dictionary< KeyType, ValueType >.GetValue | ( | KeyType | key, |
| ValueType | defaultValue | ||
| ) |
Fetches the value associated with a key or a default value.
| key | the key associated with the value to retrieve |
| defaultValue | the value to return if the key is not found in the map |
Implements Joutsen.Collections.Generic.Mapping< KeyType, ValueType >.
| override String Joutsen.Collections.Generic.Dictionary< KeyType, ValueType >.ToString | ( | ) |
| void Joutsen.Collections.Generic.Dictionary< KeyType, ValueType >.Update | ( | SCG.IEnumerable< SCG.KeyValuePair< KeyType, ValueType > > | newValues | ) |
Adds or updates values in the map.
| newValues | the pairs that are used to modify the map |
Implements Joutsen.Collections.Generic.Map< KeyType, ValueType >.