|
Mercury library
1.0
Translation of CFG grammars into an object model (Bachelor's thesis).
|
An implementation of IMultiDictionary{TKey,TValue} using T:System.Collections.Generic.HashSet{T} as an underlying collection of values. More...
Public Member Functions | |
| bool | Add (TKey key, TValue value) |
| Adds the value to the dictionary. The actual behaviour and handling of duplicities is specified by an implementation. More... | |
| bool | Add (KeyValuePair< TKey, TValue > pair) |
| Adds the value to the dictionary. The actual behaviour and handling of duplicities is specified by an implementation. More... | |
| bool | Add (TKey key, IEnumerable< TValue > values) |
Adds the collection of values to the dictionary. If the key is already present, NO value is added and false will be returned. More... | |
| bool | Contains (TKey key, TValue value) |
| Indicates whether this collection contains the specified key and value. More... | |
| bool | ContainsKey (TKey key) |
| Indicates whether this collection contains the specified key. More... | |
| void | Clear () |
| Removes the content of collection. More... | |
| bool | TryGetValue (TKey key, out IReadOnlyList< TValue > collection) |
| Gets the value associated with the specified key. More... | |
| IEnumerator< KeyValuePair < TKey, TValue > > | GetEnumerator () |
Protected Attributes | |
| Dictionary< TKey, HashSet < TValue > > | data = new Dictionary<TKey, HashSet<TValue>>() |
Properties | |
| ICollection< TKey > | Keys [get] |
| IReadOnlyList< TValue > | this[TKey key] [get] |
Properties inherited from Mercury.Nucleus.Collections.IReadOnlyMultiDictionary< TKey, TValue > | |
| ICollection< TKey > | Keys [get] |
| The collection of keys. More... | |
| IReadOnlyList< TValue > | this[TKey key] [get] |
| Gets the collection of values associated with the specified key. More... | |
An implementation of IMultiDictionary{TKey,TValue} using T:System.Collections.Generic.HashSet{T} as an underlying collection of values.
This implementation of IMultiDictionary{TKey,TValue} DOES NOT allow duplicit (key,value) pairs.
| TKey | The type of the key. |
| TValue | The type of the value. |
Definition at line 127 of file MultiDictionary.cs.
| bool Mercury.Nucleus.Collections.SetMultiDictionary< TKey, TValue >.Add | ( | TKey | key, |
| TValue | value | ||
| ) |
Adds the value to the dictionary. The actual behaviour and handling of duplicities is specified by an implementation.
| key | The key. |
| value | The value. |
true if value added successfully, false otherwise (depends on the implementation). | ArgumentNullException | The key is null. |
Implements Mercury.Nucleus.Collections.IMultiDictionary< TKey, TValue >.
Definition at line 139 of file MultiDictionary.cs.
| bool Mercury.Nucleus.Collections.SetMultiDictionary< TKey, TValue >.Add | ( | KeyValuePair< TKey, TValue > | tuple | ) |
Adds the value to the dictionary. The actual behaviour and handling of duplicities is specified by an implementation.
| tuple | The tuple of key and value. |
true if value added successfully, false otherwise (depends on the implementation). | ArgumentNullException | The tuple is null. |
Implements Mercury.Nucleus.Collections.IMultiDictionary< TKey, TValue >.
Definition at line 149 of file MultiDictionary.cs.
| bool Mercury.Nucleus.Collections.SetMultiDictionary< TKey, TValue >.Add | ( | TKey | key, |
| IEnumerable< TValue > | values | ||
| ) |
Adds the collection of values to the dictionary. If the key is already present, NO value is added and false will be returned.
| key | The key. |
| values | The collection of values. |
true if key is not present yet and at least one value was successfully added; false otherwise. | ArgumentNullException | The key is null. |
Implements Mercury.Nucleus.Collections.IMultiDictionary< TKey, TValue >.
Definition at line 152 of file MultiDictionary.cs.
| void Mercury.Nucleus.Collections.SetMultiDictionary< TKey, TValue >.Clear | ( | ) |
Removes the content of collection.
Implements Mercury.Nucleus.Collections.IMultiDictionary< TKey, TValue >.
Definition at line 172 of file MultiDictionary.cs.
| bool Mercury.Nucleus.Collections.SetMultiDictionary< TKey, TValue >.Contains | ( | TKey | key, |
| TValue | value | ||
| ) |
Indicates whether this collection contains the specified key and value.
| key | The key. |
| value | The value. |
true if this collection contains the given key and value.Implements Mercury.Nucleus.Collections.IReadOnlyMultiDictionary< TKey, TValue >.
Definition at line 160 of file MultiDictionary.cs.
| bool Mercury.Nucleus.Collections.SetMultiDictionary< TKey, TValue >.ContainsKey | ( | TKey | key | ) |
Indicates whether this collection contains the specified key.
| key | The key. |
true if the collection contains the key, false otherwise. | ArgumentNullException | The key is null. |
Implements Mercury.Nucleus.Collections.IReadOnlyMultiDictionary< TKey, TValue >.
Definition at line 169 of file MultiDictionary.cs.
| IEnumerator<KeyValuePair<TKey, TValue> > Mercury.Nucleus.Collections.SetMultiDictionary< TKey, TValue >.GetEnumerator | ( | ) |
Definition at line 194 of file MultiDictionary.cs.
| bool Mercury.Nucleus.Collections.SetMultiDictionary< TKey, TValue >.TryGetValue | ( | TKey | key, |
| out IReadOnlyList< TValue > | collection | ||
| ) |
Gets the value associated with the specified key.
| key | The key. |
| collection | When this method returns true, this fuek contains the values associated with the given key, otherwise it is set to null. |
true if the key was found, false otherwiseImplements Mercury.Nucleus.Collections.IReadOnlyMultiDictionary< TKey, TValue >.
Definition at line 175 of file MultiDictionary.cs.
|
protected |
Definition at line 133 of file MultiDictionary.cs.
|
get |
Definition at line 185 of file MultiDictionary.cs.
|
get |
Definition at line 188 of file MultiDictionary.cs.
1.8.7