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 | Properties | List of all members
Mercury.Nucleus.Collections.IReadOnlyMultiDictionary< TKey, TValue > Interface Template Reference

Represents a multi-valued read-only dictionary, a map between a key and a collection of values. More...

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

## Public Member Functions
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...

## Properties
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 read-only dictionary, 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 18 of file MultiDictionary.cs.

## Member Function Documentation

bool Mercury.Nucleus.Collections.IReadOnlyMultiDictionary< TKey, TValue >.Contains | ( | TKey | key,
|  | TValue | value
| ) |  |

Indicates whether this collection contains the specified key and value.

Parameters

  key | The key.
  value | The value.

Returns
  `true` if this collection contains the given key and value.

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.IReadOnlyMultiDictionary< TKey, TValue >.ContainsKey | ( | TKey | key | ) |

Indicates whether this collection contains the specified key.

Parameters

  key | The key.

Returns
  `true` if the collection contains the key, `false` otherwise.

Exceptions

  ArgumentNullException | The key is null.

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

bool Mercury.Nucleus.Collections.IReadOnlyMultiDictionary< TKey, TValue >.TryGetValue | ( | TKey | key,
|  | out IReadOnlyList< TValue > | collection
| ) |  |

Gets the value associated with the specified key.

Parameters

  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`.

Returns
  `true` if the key was found, `false` otherwise

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

## Property Documentation

ICollection<TKey> Mercury.Nucleus.Collections.IReadOnlyMultiDictionary< TKey, TValue >.Keys
| get

The collection of keys.

Definition at line 45 of file MultiDictionary.cs.

IReadOnlyList<TValue> Mercury.Nucleus.Collections.IReadOnlyMultiDictionary< TKey, TValue >.this[TKey key]
| get

Gets the collection of values associated with the specified key.

Parameters

  key | The key.

Returns
  The collection of values associated with the key .

Exceptions

  KeyNotFoundException | The key was not found

Definition at line 51 of file MultiDictionary.cs.

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

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