|
Sharpility
|
Immutable implementation of MultiDictionary. More...
Classes | |
| class | AbstractImmutableListMultiDictionaryBuilder |
| Builder of ImmutableMultiDictionary. More... | |
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. | |
| override bool | Equals (object obj) |
| override int | GetHashCode () |
| override string | ToString () |
Protected Member Functions | |
| ImmutableMultiDictionary (IImmutableDictionary< TKey, ICollection< TValue >> dictionary) | |
| Creates ImmutableMultiDictionary from immutable dictionary. | |
| abstract ICollection< TValue > | EmptyCollection () |
| Returns empty collection matching MultiDictionary implementation. | |
| abstract ICollection< TValue > | MutableCopy (ICollection< TValue > values) |
| Creates mutable copy of given collection. | |
Properties | |
| int | Count [get, set] |
| Returns number of all values. | |
| ICollection< TValue > | this[TKey key] [get] |
| Returns all values mapped by given key. | |
| 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. | |
Immutable implementation of MultiDictionary.
| TKey | Type of dictionary key |
| TValue | Type of dictionary value |
| void Sharpility.Collections.ImmutableMultiDictionary< TKey, TValue >.Clear | ( | ) | [inline] |
Removes all entries.
Implements Sharpility.Collections.MultiDictionary< TKey, TValue >.
| bool Sharpility.Collections.ImmutableMultiDictionary< TKey, TValue >.ContainsEntry | ( | TKey | key, |
| TValue | value | ||
| ) | [inline] |
Checks is dictionary contains given entry.
| key | Checked key |
| value | Checked value |
Implements Sharpility.Collections.MultiDictionary< TKey, TValue >.
| bool Sharpility.Collections.ImmutableMultiDictionary< TKey, TValue >.ContainsKey | ( | TKey | key | ) | [inline] |
Checks is dictionary contains given key.
| key | Checked key |
Implements Sharpility.Collections.MultiDictionary< TKey, TValue >.
| bool Sharpility.Collections.ImmutableMultiDictionary< TKey, TValue >.ContainsValue | ( | TValue | value | ) | [inline] |
Checks is dictionary contains given value.
| value | Checked value |
Implements Sharpility.Collections.MultiDictionary< TKey, TValue >.
| abstract ICollection<TValue> Sharpility.Collections.ImmutableMultiDictionary< TKey, TValue >.EmptyCollection | ( | ) | [protected, pure virtual] |
Returns empty collection matching MultiDictionary implementation.
Implemented in Sharpility.Collections.ImmutableListMultiDictionary< TKey, TValue >, and Sharpility.Collections.ImmutableSetMultiDictionary< TKey, TValue >.
| ICollection<TValue> Sharpility.Collections.ImmutableMultiDictionary< TKey, TValue >.Get | ( | TKey | key | ) | [inline] |
Returns all values mapped by given key.
| key | Key |
Implements Sharpility.Collections.MultiDictionary< TKey, TValue >.
| Sharpility.Collections.ImmutableMultiDictionary< TKey, TValue >.ImmutableMultiDictionary | ( | IImmutableDictionary< TKey, ICollection< TValue >> | dictionary | ) | [inline, protected] |
Creates ImmutableMultiDictionary from immutable dictionary.
| dictionary | Immutable dictionary |
| abstract ICollection<TValue> Sharpility.Collections.ImmutableMultiDictionary< TKey, TValue >.MutableCopy | ( | ICollection< TValue > | values | ) | [protected, pure virtual] |
Creates mutable copy of given collection.
| values | Transformed collection |
Implemented in Sharpility.Collections.ImmutableListMultiDictionary< TKey, TValue >, and Sharpility.Collections.ImmutableSetMultiDictionary< TKey, TValue >.
| void Sharpility.Collections.ImmutableMultiDictionary< TKey, TValue >.Put | ( | TKey | key, |
| TValue | value | ||
| ) | [inline] |
Puts value at given key.
| key | key value |
| value | value |
Implements Sharpility.Collections.MultiDictionary< TKey, TValue >.
| void Sharpility.Collections.ImmutableMultiDictionary< TKey, TValue >.PutAll | ( | TKey | key, |
| IEnumerable< TValue > | values | ||
| ) | [inline] |
Puts multiple values to given key.
| key | |
| values |
Implements Sharpility.Collections.MultiDictionary< TKey, TValue >.
| void Sharpility.Collections.ImmutableMultiDictionary< TKey, TValue >.PutAll | ( | MultiDictionary< TKey, TValue > | multiDictionary | ) | [inline] |
Pults all entries from given multiDictionary.
| multiDictionary | MultiDictionary |
Implements Sharpility.Collections.MultiDictionary< TKey, TValue >.
| void Sharpility.Collections.ImmutableMultiDictionary< TKey, TValue >.PutAll | ( | IEnumerable< KeyValuePair< TKey, TValue >> | entries | ) | [inline] |
Puts all entries.
| entries | KeyValuePair entries |
Implements Sharpility.Collections.MultiDictionary< TKey, TValue >.
| bool Sharpility.Collections.ImmutableMultiDictionary< TKey, TValue >.Remove | ( | TKey | key | ) | [inline] |
Removes key entries.
| key | Removed key |
Implements Sharpility.Collections.MultiDictionary< TKey, TValue >.
| bool Sharpility.Collections.ImmutableMultiDictionary< TKey, TValue >.Remove | ( | TKey | key, |
| TValue | value | ||
| ) | [inline] |
Removes key-value entry.
| key | Removed key |
| value | Removed value |
Implements Sharpility.Collections.MultiDictionary< TKey, TValue >.
| ICollection<TValue> Sharpility.Collections.ImmutableMultiDictionary< TKey, TValue >.RemoveAll | ( | TKey | key | ) | [inline] |
Removes all values at given key.
| key | Removed keyh |
Implements Sharpility.Collections.MultiDictionary< TKey, TValue >.
| ICollection<TValue> Sharpility.Collections.ImmutableMultiDictionary< TKey, TValue >.ReplaceValues | ( | TKey | key, |
| IEnumerable< TValue > | values | ||
| ) | [inline] |
Replaces all values by given key.
| key | Key value |
| values | Values to replace |
Implements Sharpility.Collections.MultiDictionary< TKey, TValue >.
| IDictionary<TKey, ICollection<TValue> > Sharpility.Collections.ImmutableMultiDictionary< TKey, TValue >.ToDictionary | ( | ) | [inline] |
Converts multi dictionary to regular dictionary.
Implements Sharpility.Collections.MultiDictionary< TKey, TValue >.
| int Sharpility.Collections.ImmutableMultiDictionary< TKey, TValue >.ValuesCount | ( | TKey | key | ) | [inline] |
Returns number of all values stored by given key.
| key | Key |
Implements Sharpility.Collections.MultiDictionary< TKey, TValue >.
int Sharpility.Collections.ImmutableMultiDictionary< TKey, TValue >.Count [get, set] |
Returns number of all values.
Implements Sharpility.Collections.MultiDictionary< TKey, TValue >.
ICollection<KeyValuePair<TKey, TValue> > Sharpility.Collections.ImmutableMultiDictionary< TKey, TValue >.Entries [get] |
Returns all entries.
Implements Sharpility.Collections.MultiDictionary< TKey, TValue >.
bool Sharpility.Collections.ImmutableMultiDictionary< TKey, TValue >.IsEmpty [get] |
Checks is dictionary is emtpy.
Implements Sharpility.Collections.MultiDictionary< TKey, TValue >.
ISet<TKey> Sharpility.Collections.ImmutableMultiDictionary< TKey, TValue >.Keys [get] |
Returns set of all keys.
Implements Sharpility.Collections.MultiDictionary< TKey, TValue >.
ICollection<KeyValuePair<TKey, ICollection<TValue> > > Sharpility.Collections.ImmutableMultiDictionary< TKey, TValue >.MultiEntries [get] |
Returns entries with multiple values for given key.
Implements Sharpility.Collections.MultiDictionary< TKey, TValue >.
ICollection<TValue> Sharpility.Collections.ImmutableMultiDictionary< TKey, TValue >.this[TKey key] [get] |
Returns all values mapped by given key.
| key | Key |
Implements Sharpility.Collections.MultiDictionary< TKey, TValue >.
ICollection<TValue> Sharpility.Collections.ImmutableMultiDictionary< TKey, TValue >.Values [get] |
Returns all values.
Implements Sharpility.Collections.MultiDictionary< TKey, TValue >.