Mercury library 1.0 Translation of CFG grammars into an object model (Bachelor's thesis).

- Main Page
- Packages
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties
Public Member Functions | List of all members
Mercury.Nucleus.Collections.IMultiDictionary< TKey, TValue > Interface Template Reference

Represents a multi-valued dictionary, in other words a map between a key and a collection of values. More...

Inheritance diagram for Mercury.Nucleus.Collections.IMultiDictionary< TKey, TValue >:

## 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 > tuple)
| 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...
void | Clear ()
| Removes the content of collection. More...
Public Member Functions inherited from Mercury.Nucleus.Collections.IReadOnlyMultiDictionary< TKey, TValue >
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...
bool | TryGetValue (TKey key, out IReadOnlyList< TValue > collection)
| Gets the value associated with the specified key. More...

## Additional Inherited Members
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...

## Detailed Description

Represents a multi-valued dictionary, in other words a map between a key and a collection of values.

Template Parameters

  TKey | The type of the key
  TValue | The type of values

Definition at line 64 of file MultiDictionary.cs.

## Member Function Documentation

bool Mercury.Nucleus.Collections.IMultiDictionary< 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.

Parameters

  key | The key.
  value | The value.

Returns
  `true` if value added successfully, `false` otherwise (depends on the implementation).

Exceptions

  ArgumentNullException | The key is null.

Implemented in Mercury.Nucleus.Collections.UniqueListMultiDictionary< TKey, TValue >, Mercury.Nucleus.Collections.ListMultiDictionary< TKey, TValue >, and Mercury.Nucleus.Collections.SetMultiDictionary< TKey, TValue >.

bool Mercury.Nucleus.Collections.IMultiDictionary< 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.

Parameters

  tuple | The tuple of key and value.

Returns
  `true` if value added successfully, `false` otherwise (depends on the implementation).

Exceptions

  ArgumentNullException | The tuple is null.

Implemented in Mercury.Nucleus.Collections.ListMultiDictionary< TKey, TValue >, and Mercury.Nucleus.Collections.SetMultiDictionary< TKey, TValue >.

bool Mercury.Nucleus.Collections.IMultiDictionary< 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.

Parameters

  key | The key.
  values | The collection of values.

Returns
  `true` if key is not present yet and at least one value was successfully added; `false` otherwise.

Exceptions

  ArgumentNullException | The key is null.

Implemented in Mercury.Nucleus.Collections.ListMultiDictionary< TKey, TValue >, and Mercury.Nucleus.Collections.SetMultiDictionary< TKey, TValue >.

void Mercury.Nucleus.Collections.IMultiDictionary< TKey, TValue >.Clear | ( |  | ) |

Removes the content of collection.

Implemented in Mercury.Nucleus.Collections.UniqueListMultiDictionary< TKey, TValue >, Mercury.Nucleus.Collections.ListMultiDictionary< TKey, TValue >, and Mercury.Nucleus.Collections.SetMultiDictionary< TKey, TValue >.

The documentation for this interface was generated from the following file:

- Mercury/Mercury/Nucleus/Collections/MultiDictionary.cs