Sharpility
Sharpility.Collections.MultiDictionary< TKey, TValue > Interface Template Reference

Dictionary that contains multiple values at given key. More...

Inheritance diagram for Sharpility.Collections.MultiDictionary< TKey, TValue >:
Sharpility.Collections.AbstractMultiDictionary< TKey, TValue > Sharpility.Collections.ImmutableMultiDictionary< TKey, TValue > Sharpility.Collections.ArrayListMultiDictionary< TKey, TValue > Sharpility.Collections.HashSetMultiDictionary< TKey, TValue > Sharpility.Collections.LinkedListMultiDictionary< TKey, TValue > Sharpility.Collections.ImmutableListMultiDictionary< TKey, TValue > Sharpility.Collections.ImmutableSetMultiDictionary< TKey, TValue >

List of all members.

Public Member Functions

void Put (TKey key, TValue value)
 Puts value at given key.
void PutAll (TKey key, IEnumerable< TValue > values)
 Puts multiple values to given key.
void PutAll (MultiDictionary< TKey, TValue > multiDictionary)
 Pults all entries from given multiDictionary.
void PutAll (IEnumerable< KeyValuePair< TKey, TValue >> entries)
 Puts all entries.
bool Remove (TKey key)
 Removes key entries.
bool Remove (TKey key, TValue value)
 Removes key-value entry.
ICollection< TValue > RemoveAll (TKey key)
 Removes all values at given key.
ICollection< TValue > ReplaceValues (TKey key, IEnumerable< TValue > values)
 Replaces all values by given key.
void Clear ()
 Removes all entries.
ICollection< TValue > Get (TKey key)
 Returns all values mapped by given key.
bool ContainsKey (TKey key)
 Checks is dictionary contains given key.
int ValuesCount (TKey key)
 Returns number of all values stored by given key.
bool ContainsValue (TValue value)
 Checks is dictionary contains given value.
bool ContainsEntry (TKey key, TValue value)
 Checks is dictionary contains given entry.
IDictionary< TKey, ICollection
< TValue > > 
ToDictionary ()
 Converts multi dictionary to regular dictionary.

Properties

ICollection< TValue > this[TKey key] [get]
 Returns all values mapped by given key.
int Count [get]
 Returns number of all values.
ISet< TKey > Keys [get]
 Returns set of all keys.
ICollection< TValue > Values [get]
 Returns all values.
ICollection< KeyValuePair
< TKey, TValue > > 
Entries [get]
 Returns all entries.
ICollection< KeyValuePair
< TKey, ICollection< TValue > > > 
MultiEntries [get]
 Returns entries with multiple values for given key.
bool IsEmpty [get]
 Checks is dictionary is emtpy.

Detailed Description

template<TKey, TValue>
interface Sharpility::Collections::MultiDictionary< TKey, TValue >

Dictionary that contains multiple values at given key.

Template Parameters:
TKeyType of key
TValueType of value

Member Function Documentation

template<TKey , TValue >
bool Sharpility.Collections.MultiDictionary< TKey, TValue >.ContainsEntry ( TKey  key,
TValue  value 
)

Checks is dictionary contains given entry.

Parameters:
keyChecked key
valueChecked value
Returns:
true if entry is stored in dictionary

Implemented in Sharpility.Collections.AbstractMultiDictionary< TKey, TValue >, and Sharpility.Collections.ImmutableMultiDictionary< TKey, TValue >.

template<TKey , TValue >
bool Sharpility.Collections.MultiDictionary< TKey, TValue >.ContainsKey ( TKey  key)

Checks is dictionary contains given key.

Parameters:
keyChecked key
Returns:
true if any value is stored by given key

Implemented in Sharpility.Collections.AbstractMultiDictionary< TKey, TValue >, and Sharpility.Collections.ImmutableMultiDictionary< TKey, TValue >.

template<TKey , TValue >
bool Sharpility.Collections.MultiDictionary< TKey, TValue >.ContainsValue ( TValue  value)

Checks is dictionary contains given value.

Parameters:
valueChecked value
Returns:
true if value is stored in dictionary

Implemented in Sharpility.Collections.AbstractMultiDictionary< TKey, TValue >, and Sharpility.Collections.ImmutableMultiDictionary< TKey, TValue >.

template<TKey , TValue >
ICollection<TValue> Sharpility.Collections.MultiDictionary< TKey, TValue >.Get ( TKey  key)

Returns all values mapped by given key.

Parameters:
keyKey
Returns:
Values for given key

Implemented in Sharpility.Collections.AbstractMultiDictionary< TKey, TValue >, and Sharpility.Collections.ImmutableMultiDictionary< TKey, TValue >.

template<TKey , TValue >
void Sharpility.Collections.MultiDictionary< TKey, TValue >.Put ( TKey  key,
TValue  value 
)

Puts value at given key.

Parameters:
keykey value
valuevalue

Implemented in Sharpility.Collections.AbstractMultiDictionary< TKey, TValue >, and Sharpility.Collections.ImmutableMultiDictionary< TKey, TValue >.

template<TKey , TValue >
void Sharpility.Collections.MultiDictionary< TKey, TValue >.PutAll ( TKey  key,
IEnumerable< TValue >  values 
)
template<TKey , TValue >
void Sharpility.Collections.MultiDictionary< TKey, TValue >.PutAll ( MultiDictionary< TKey, TValue >  multiDictionary)

Pults all entries from given multiDictionary.

Parameters:
multiDictionaryMultiDictionary

Implemented in Sharpility.Collections.AbstractMultiDictionary< TKey, TValue >, and Sharpility.Collections.ImmutableMultiDictionary< TKey, TValue >.

template<TKey , TValue >
void Sharpility.Collections.MultiDictionary< TKey, TValue >.PutAll ( IEnumerable< KeyValuePair< TKey, TValue >>  entries)
template<TKey , TValue >
bool Sharpility.Collections.MultiDictionary< TKey, TValue >.Remove ( TKey  key)

Removes key entries.

Parameters:
keyRemoved key
Returns:
true - if any value was removed

Implemented in Sharpility.Collections.AbstractMultiDictionary< TKey, TValue >, and Sharpility.Collections.ImmutableMultiDictionary< TKey, TValue >.

template<TKey , TValue >
bool Sharpility.Collections.MultiDictionary< TKey, TValue >.Remove ( TKey  key,
TValue  value 
)

Removes key-value entry.

Parameters:
keyRemoved key
valueRemoved value
Returns:
true if entry was removed

Implemented in Sharpility.Collections.AbstractMultiDictionary< TKey, TValue >, and Sharpility.Collections.ImmutableMultiDictionary< TKey, TValue >.

template<TKey , TValue >
ICollection<TValue> Sharpility.Collections.MultiDictionary< TKey, TValue >.RemoveAll ( TKey  key)

Removes all values at given key.

Parameters:
keyRemoved keyh
Returns:
Removed values

Implemented in Sharpility.Collections.AbstractMultiDictionary< TKey, TValue >, and Sharpility.Collections.ImmutableMultiDictionary< TKey, TValue >.

template<TKey , TValue >
ICollection<TValue> Sharpility.Collections.MultiDictionary< TKey, TValue >.ReplaceValues ( TKey  key,
IEnumerable< TValue >  values 
)

Replaces all values by given key.

Parameters:
keyKey value
valuesValues to replace
Returns:
Replaced values

Implemented in Sharpility.Collections.AbstractMultiDictionary< TKey, TValue >, and Sharpility.Collections.ImmutableMultiDictionary< TKey, TValue >.

template<TKey , TValue >
IDictionary<TKey, ICollection<TValue> > Sharpility.Collections.MultiDictionary< TKey, TValue >.ToDictionary ( )
template<TKey , TValue >
int Sharpility.Collections.MultiDictionary< TKey, TValue >.ValuesCount ( TKey  key)

Returns number of all values stored by given key.

Parameters:
keyKey
Returns:
Number of all values stored by given key

Implemented in Sharpility.Collections.AbstractMultiDictionary< TKey, TValue >, and Sharpility.Collections.ImmutableMultiDictionary< TKey, TValue >.


Property Documentation

template<TKey , TValue >
ICollection<KeyValuePair<TKey, TValue> > Sharpility.Collections.MultiDictionary< TKey, TValue >.Entries [get]
template<TKey , TValue >
ICollection<KeyValuePair<TKey, ICollection<TValue> > > Sharpility.Collections.MultiDictionary< TKey, TValue >.MultiEntries [get]
template<TKey , TValue >
ICollection<TValue> Sharpility.Collections.MultiDictionary< TKey, TValue >.this[TKey key] [get]

Returns all values mapped by given key.

Parameters:
keyKey
Returns:
Values for given key

Implemented in Sharpility.Collections.AbstractMultiDictionary< TKey, TValue >, and Sharpility.Collections.ImmutableMultiDictionary< TKey, TValue >.

template<TKey , TValue >
ICollection<TValue> Sharpility.Collections.MultiDictionary< TKey, TValue >.Values [get]

The documentation for this interface was generated from the following file:
 All Classes Namespaces Functions Enumerations Properties