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 | Protected Attributes | List of all members
Mercury.Nucleus.Collections.UniqueListMultiDictionary< TKey, TValue > Class Template Reference

An implementation of IMultiDictionary{TKey,TValue} using T:System.Collections.Generic.List{T} as underlying collection, but opposed to ListMultiDictionary{TKey,TValue} does not allow duplicate values associated with the same key More...

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

## Public Member Functions
override 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...
override bool | Contains (TKey key, TValue value)
| Indicates whether this collection contains the specified key and value. More...
override void | Clear ()
| Removes the content of collection. More...
Public Member Functions inherited from Mercury.Nucleus.Collections.ListMultiDictionary< TKey, TValue >
| ListMultiDictionary ()
| Default constructor, creates an empty dictionary More...
| ListMultiDictionary (IMultiDictionary< TKey, TValue > source)
| Creates a multidictionary initialized by values from another multidictionary. More...
TValue | GetValue (TKey key, int ix)
| Gets the value from the underlying list. More...
int | GetValuesCount (TKey key)
| The size of underlying list. More...
virtual 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...
virtual 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 | 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...
IEnumerator< KeyValuePair < TKey, TValue > > | GetEnumerator ()

## Protected Attributes
SetMultiDictionary< TKey, TValue > | data = new SetMultiDictionary<TKey, TValue>()

## Additional Inherited Members
Properties inherited from Mercury.Nucleus.Collections.ListMultiDictionary< TKey, TValue >
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...

## Detailed Description

An implementation of IMultiDictionary{TKey,TValue} using T:System.Collections.Generic.List{T} as underlying collection, but opposed to ListMultiDictionary{TKey,TValue} does not allow duplicate values associated with the same key

This implementation of IMultiDictionary{TKey,TValue} DOES NOT allow duplicit `(key,value)` pairs.

Template Parameters

  TKey | The type of the key.
  TValue | The type of the value.

Definition at line 351 of file MultiDictionary.cs.

## Member Function Documentation

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

Implements Mercury.Nucleus.Collections.IMultiDictionary< TKey, TValue >.

Definition at line 363 of file MultiDictionary.cs.

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

Removes the content of collection.

Implements Mercury.Nucleus.Collections.IMultiDictionary< TKey, TValue >.

Definition at line 369 of file MultiDictionary.cs.

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

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.

Reimplemented from Mercury.Nucleus.Collections.ListMultiDictionary< TKey, TValue >.

Definition at line 366 of file MultiDictionary.cs.

## Member Data Documentation

SetMultiDictionary<TKey, TValue> Mercury.Nucleus.Collections.UniqueListMultiDictionary< TKey, TValue >.data = new SetMultiDictionary<TKey, TValue>()
| protected

Definition at line 357 of file MultiDictionary.cs.

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

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