Skip to content

Methods_T_CodeJam_Collections_DictionaryExtensions

Andrew Koryavchenko edited this page Jul 4, 2017 · 7 revisions

DictionaryExtensions Methods

Methods

 

Name Description
Public methodStatic member AddOrUpdate(TKey, TValue)(ConcurrentDictionary(TKey, TValue), TKey, Func(TKey, TValue)) Adds a key/value pair to the ConcurrentDictionary(TKey, TValue) if the key does not already exist, or updates a key/value pair ConcurrentDictionary(TKey, TValue) by using the specified function if the key already exists.
Public methodStatic member AddOrUpdate(TKey, TValue)(IDictionary(TKey, TValue), TKey, Func(TKey, TValue)) Adds a key/value pair to the IDictionary(TKey, TValue) if the key does not already exist, or updates a key/value pair IDictionary(TKey, TValue) by using the specified function if the key already exists.
Public methodStatic member AddOrUpdate(TKey, TValue)(IDictionary(TKey, TValue), TKey, Func(TKey, TValue), Func(TKey, TValue, TValue)) Adds a key/value pair to the IDictionary(TKey, TValue) if the key does not already exist, or updates a key/value pair IDictionary(TKey, TValue) by using the specified function if the key already exists.
Public methodStatic member AddOrUpdate(TKey, TValue)(IDictionary(TKey, TValue), TKey, TValue, Func(TKey, TValue, TValue)) Adds a key/value pair to the IDictionary(TKey, TValue) if the key does not already exist, or updates a key/value pair IDictionary(TKey, TValue) by using the specified function if the key already exists.
Public methodStatic member GetOrAdd(TKey, TValue)(IDictionary(TKey, TValue), TKey) Adds a key/value pair to the IDictionary(TKey, TValue) if the key does not already exist.
Public methodStatic member GetOrAdd(TKey, TValue)(IDictionary(TKey, TValue), TKey, Func(TKey, TValue)) Adds a key/value pair to the IDictionary(TKey, TValue) if the key does not already exist.
Public methodStatic member GetOrAdd(TKey, TValue)(IDictionary(TKey, TValue), TKey, TValue) Adds a key/value pair to the IDictionary(TKey, TValue) if the key does not already exist.
Public methodStatic member GetValueOrDefault(TKey, TValue)(ConcurrentDictionary(TKey, TValue), TKey) Returns value associated with key, or default(TValue) if key does not exists in dictionary
Public methodStatic member GetValueOrDefault(TKey, TValue)(Dictionary(TKey, TValue), TKey) Returns value associated with key, or default(TValue) if key does not exists in dictionary
Public methodStatic member GetValueOrDefault(TKey, TValue)(IDictionary(TKey, TValue), TKey) Returns value associated with key, or default(TValue) if key does not exists in dictionary
Public methodStatic member GetValueOrDefault(TKey, TValue)(IReadOnlyDictionary(TKey, TValue), TKey) Returns value associated with key, or default(TValue) if key does not exists in dictionary
Public methodStatic member GetValueOrDefault(TKey, TValue)(ConcurrentDictionary(TKey, TValue), TKey, Func(TKey, TValue)) Returns value associated with key, or value returned by defaultValueFactory if key does not exists in dictionary
Public methodStatic member GetValueOrDefault(TKey, TValue)(ConcurrentDictionary(TKey, TValue), TKey, TValue) Returns value associated with key, or defaultValue if key does not exists in dictionary
Public methodStatic member GetValueOrDefault(TKey, TValue)(Dictionary(TKey, TValue), TKey, Func(TKey, TValue)) Returns value associated with key, or value returned by defaultValueFactory if key does not exists in dictionary
Public methodStatic member GetValueOrDefault(TKey, TValue)(Dictionary(TKey, TValue), TKey, TValue) Returns value associated with key, or defaultValue if key does not exists in dictionary
Public methodStatic member GetValueOrDefault(TKey, TValue)(IDictionary(TKey, TValue), TKey, Func(TKey, TValue)) Returns value associated with key, or value returned by defaultValueFactory if key does not exists in dictionary
Public methodStatic member GetValueOrDefault(TKey, TValue)(IDictionary(TKey, TValue), TKey, TValue) Returns value associated with key, or defaultValue if key does not exists in dictionary
Public methodStatic member GetValueOrDefault(TKey, TValue)(IReadOnlyDictionary(TKey, TValue), TKey, Func(TKey, TValue)) Returns value associated with key, or value returned by defaultValueFactory if key does not exists in dictionary
Public methodStatic member GetValueOrDefault(TKey, TValue)(IReadOnlyDictionary(TKey, TValue), TKey, TValue) Returns value associated with key, or defaultValue if key does not exists in dictionary
Public methodStatic member GetValueOrDefault(TKey, TValue, TResult)(ConcurrentDictionary(TKey, TValue), TKey, Func(TKey, TValue, TResult)) Returns value associated with key, or default value if key does not exists in dictionary
Public methodStatic member GetValueOrDefault(TKey, TValue, TResult)(Dictionary(TKey, TValue), TKey, Func(TKey, TValue, TResult)) Returns value associated with key, or default value if key does not exists in dictionary
Public methodStatic member GetValueOrDefault(TKey, TValue, TResult)(IDictionary(TKey, TValue), TKey, Func(TKey, TValue, TResult)) Returns value associated with key, or default value if key does not exists in dictionary
Public methodStatic member GetValueOrDefault(TKey, TValue, TResult)(IReadOnlyDictionary(TKey, TValue), TKey, Func(TKey, TValue, TResult)) Returns value associated with key, or default value if key does not exists in dictionary
Public methodStatic member GetValueOrDefault(TKey, TValue, TResult)(ConcurrentDictionary(TKey, TValue), TKey, Func(TKey, TValue, TResult), Func(TKey, TResult)) Returns value associated with key, or value returned by defaultValueFactory if key does not exists in dictionary
Public methodStatic member GetValueOrDefault(TKey, TValue, TResult)(ConcurrentDictionary(TKey, TValue), TKey, Func(TKey, TValue, TResult), TResult) Returns value associated with key, or defaultValue if key does not exists in dictionary
Public methodStatic member GetValueOrDefault(TKey, TValue, TResult)(Dictionary(TKey, TValue), TKey, Func(TKey, TValue, TResult), Func(TKey, TResult)) Returns value associated with key, or value returned by defaultValueFactory if key does not exists in dictionary
Public methodStatic member GetValueOrDefault(TKey, TValue, TResult)(Dictionary(TKey, TValue), TKey, Func(TKey, TValue, TResult), TResult) Returns value associated with key, or defaultValue if key does not exists in dictionary
Public methodStatic member GetValueOrDefault(TKey, TValue, TResult)(IDictionary(TKey, TValue), TKey, Func(TKey, TValue, TResult), Func(TKey, TResult)) Returns value associated with key, or value returned by defaultValueFactory if key does not exists in dictionary
Public methodStatic member GetValueOrDefault(TKey, TValue, TResult)(IDictionary(TKey, TValue), TKey, Func(TKey, TValue, TResult), TResult) Returns value associated with key, or defaultValue if key does not exists in dictionary
Public methodStatic member GetValueOrDefault(TKey, TValue, TResult)(IReadOnlyDictionary(TKey, TValue), TKey, Func(TKey, TValue, TResult), Func(TKey, TResult)) Returns value associated with key, or value returned by defaultValueFactory if key does not exists in dictionary
Public methodStatic member GetValueOrDefault(TKey, TValue, TResult)(IReadOnlyDictionary(TKey, TValue), TKey, Func(TKey, TValue, TResult), TResult) Returns value associated with key, or defaultValue if key does not exists in dictionary
  Back to Top

See Also

Reference

DictionaryExtensions Class
CodeJam.Collections Namespace

Clone this wiki locally