Summer.Batch.Extra.Utils.MapUtils Class Reference

Dictionary helper. More...

Static Public Member Functions

static bool ContainsKey< TK, TV > (IDictionary< TK, TV > dictionary, TK key)
 Test if dictionary contains key More...
 
static bool ContainsValue< TK, TV > (IDictionary< TK, TV > dictionary, TV value)
 Test if dictionary contains value. More...
 
static TV Remove< TK, TV > (IDictionary< TK, TV > dictionary, TK key)
 Remove entry for given key. More...
 
static TV Put< TK, TV > (IDictionary< TK, TV > dictionary, TK key, TV value)
 Associates the specified value with the specified key in the specified dictionary. More...
 
static void PutAll< TK, TV > (IDictionary< TK, TV > dictionary1, IDictionary< TK, TV > dictionary2)
 Copies all of the mappings from dictionary1 to dictionary2. More...
 
static ISet< TK > KeySet< TK, TV > (IDictionary< TK, TV > dictionary)
 Returns a Set view of the keys contained in this dictionary. More...
 
static TV Get< TK, TV > (IDictionary< TK, TV > dictionary, TK key)
 Returns the value to which the specified key is dictionaryped, or null if this dictionary contains no dictionaryping for the key. More...
 
static ICollection< TV > Values< TK, TV > (IDictionary< TK, TV > dictionary)
 Returns a Collection view of the values contained in this dictionary. More...
 

Detailed Description

Dictionary helper.

Member Function Documentation

static bool Summer.Batch.Extra.Utils.MapUtils.ContainsKey< TK, TV > ( IDictionary< TK, TV >  dictionary,
TK  key 
)
static

Test if dictionary contains key

Template Parameters
TK the key type
TV the value type
Parameters
dictionarythe dictionary
key
Returns
true if this dictionary contains a value for the specified key.
Type Constraints
TK :class 
static bool Summer.Batch.Extra.Utils.MapUtils.ContainsValue< TK, TV > ( IDictionary< TK, TV >  dictionary,
TV  value 
)
static

Test if dictionary contains value.

Template Parameters
TK the key type
TV the value type
Parameters
dictionarythe dictionary
valuethe value
Returns
true if this dictionary maps one or more keys to the specified value.
Type Constraints
TK :class 
static TV Summer.Batch.Extra.Utils.MapUtils.Get< TK, TV > ( IDictionary< TK, TV >  dictionary,
TK  key 
)
static

Returns the value to which the specified key is dictionaryped, or null if this dictionary contains no dictionaryping for the key.

Template Parameters
TK the key type
TV the value type
Parameters
keythe key to get the value from
dictionarythe dictionary
Returns
the value dictionaryped with the key.
Type Constraints
TK :class 
static ISet<TK> Summer.Batch.Extra.Utils.MapUtils.KeySet< TK, TV > ( IDictionary< TK, TV >  dictionary)
static

Returns a Set view of the keys contained in this dictionary.

Template Parameters
TK the key type
TV the value type
Parameters
dictionarythe dictionary
Returns
a set view of the keys contained in this dictionary.
Type Constraints
TK :class 
static TV Summer.Batch.Extra.Utils.MapUtils.Put< TK, TV > ( IDictionary< TK, TV >  dictionary,
TK  key,
TV  value 
)
static

Associates the specified value with the specified key in the specified dictionary.

Template Parameters
TK the key type
TV the value type
Parameters
dictionarythe dictionary where to store the value
keythe key to associate the value to
valuethe value to put in the dictionary
Returns
the previous value associated to the key, or the default value if there was none
Type Constraints
TK :class 
static void Summer.Batch.Extra.Utils.MapUtils.PutAll< TK, TV > ( IDictionary< TK, TV >  dictionary1,
IDictionary< TK, TV >  dictionary2 
)
static

Copies all of the mappings from dictionary1 to dictionary2.

Template Parameters
TK the key type
TV the value type
Parameters
dictionary1the dictionary1
dictionary2the dictionary2
Type Constraints
TK :class 
static TV Summer.Batch.Extra.Utils.MapUtils.Remove< TK, TV > ( IDictionary< TK, TV >  dictionary,
TK  key 
)
static

Remove entry for given key.

Template Parameters
TK the key type
TV the value type
Parameters
dictionarythe dictionary
keythe key
Returns
the previous value associated with key, or the default value if there was no dictionaryping for key.
Type Constraints
TK :class 
static ICollection<TV> Summer.Batch.Extra.Utils.MapUtils.Values< TK, TV > ( IDictionary< TK, TV >  dictionary)
static

Returns a Collection view of the values contained in this dictionary.

Template Parameters
TK the key type
TV the value type
Parameters
dictionarythe dictionary
Returns
the value dictionaryped with the key
Type Constraints
TK :class 

The documentation for this class was generated from the following file:
  • Summer.Batch.Extra/Utils/MapUtils.cs