Mercury library  1.0
Translation of CFG grammars into an object model (Bachelor's thesis).
 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 >:
Mercury.Nucleus.Collections.IMultiDictionary< TKey, TValue > Mercury.Nucleus.Collections.ListMultiDictionary< TKey, TValue > Mercury.Nucleus.Collections.SetMultiDictionary< TKey, TValue > Mercury.Nucleus.Collections.UniqueListMultiDictionary< TKey, TValue > Mercury.Nucleus.Collections.UniqueListMultiDictionary< 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
TKeyThe type of the key.
TValueThe 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
keyThe key.
valueThe 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
keyThe key.
Returns
true if the collection contains the key, false otherwise.
Exceptions
ArgumentNullExceptionThe 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
keyThe key.
collectionWhen 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
keyThe key.
Returns
The collection of values associated with the key .
Exceptions
KeyNotFoundExceptionThe key was not found

Definition at line 51 of file MultiDictionary.cs.


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