Wintellect.PowerCollections Namespace
Algorithms Class
GhostDoc Pro Sample Help File

OrderedMultiDictionary<(Of <(<'TKey, TValue>)>)> Members

The OrderedMultiDictionary<(Of <(<'TKey, TValue>)>)> type exposes the following members.

Constructors


  Name Description
Public method OrderedMultiDictionary<(Of <(<'TKey, TValue>)>)>(Boolean)
Create a new OrderedMultiDictionary. The default ordering of keys and values are used. If duplicate values are allowed, multiple copies of the same value can be associated with the same key. For example, the key "foo" could have "a", "a", and "b" associated with it. If duplicate values are not allowed, only one copies of a given value can be associated with the same key, although different keys can have the same value. For example, the key "foo" could have "a" and "b" associated with it, which key "bar" has values "b" and "c" associated with it.
Public method OrderedMultiDictionary<(Of <(<'TKey, TValue>)>)>(Boolean, Comparison<(Of <<'(TKey>)>>))
Create a new OrderedMultiDictionary. If duplicate values are allowed, multiple copies of the same value can be associated with the same key. For example, the key "foo" could have "a", "a", and "b" associated with it. If duplicate values are not allowed, only one copies of a given value can be associated with the same key, although different keys can have the same value. For example, the key "foo" could have "a" and "b" associated with it, which key "bar" has values "b" and "c" associated with it.
Public method OrderedMultiDictionary<(Of <(<'TKey, TValue>)>)>(Boolean, Comparison<(Of <<'(TKey>)>>), Comparison<(Of <<'(TValue>)>>))
Create a new OrderedMultiDictionary. If duplicate values are allowed, multiple copies of the same value can be associated with the same key. For example, the key "foo" could have "a", "a", and "b" associated with it. If duplicate values are not allowed, only one copies of a given value can be associated with the same key, although different keys can have the same value. For example, the key "foo" could have "a" and "b" associated with it, which key "bar" has values "b" and "c" associated with it.
Public method OrderedMultiDictionary<(Of <(<'TKey, TValue>)>)>(Boolean, IComparer<(Of <<'(TKey>)>>))
Create a new OrderedMultiDictionary. If duplicate values are allowed, multiple copies of the same value can be associated with the same key. For example, the key "foo" could have "a", "a", and "b" associated with it. If duplicate values are not allowed, only one copies of a given value can be associated with the same key, although different keys can have the same value. For example, the key "foo" could have "a" and "b" associated with it, which key "bar" has values "b" and "c" associated with it.
Public method OrderedMultiDictionary<(Of <(<'TKey, TValue>)>)>(Boolean, IComparer<(Of <<'(TKey>)>>), IComparer<(Of <<'(TValue>)>>))
Create a new OrderedMultiDictionary. If duplicate values are allowed, multiple copies of the same value can be associated with the same key. For example, the key "foo" could have "a", "a", and "b" associated with it. If duplicate values are not allowed, only one copies of a given value can be associated with the same key, although different keys can have the same value. For example, the key "foo" could have "a" and "b" associated with it, which key "bar" has values "b" and "c" associated with it.

Methods


  Name Description
Public method Add

Adds a new value to be associated with a key. If duplicate values are permitted, this method always adds a new key-value pair to the dictionary.

If duplicate values are not permitted, and key already has a value equal to value associated with it, then that value is replaced with value, and the number of values associate with key is unchanged.

Public method Clear
Removes all keys and values from the dictionary.
Public method Clone
Makes a shallow clone of this dictionary; i.e., if keys or values of the dictionary are reference types, then they are not cloned. If TKey or TValue is a value type, then each element is copied as if by simple assignment.
Public method CloneContents
Makes a deep clone of this dictionary. A new dictionary is created with a clone of each entry of this dictionary, by calling ICloneable.Clone on each element. If TKey or TValue is a value type, then each element is copied as if by simple assignment.
Public method Contains
Checks to see if value is associated with key in the dictionary.
Public method ContainsKey
Checks to see if the key is present in the dictionary and has at least one value associated with it.
Public method Range
Returns a collection that can be used for enumerating some of the keys and values in the collection. Only keys that are greater than from and less than to are included. The keys are enumerated in sorted order. Keys equal to the end points of the range can be included or excluded depending on the fromInclusive and toInclusive parameters.
Public method RangeFrom
Returns a collection that can be used for enumerating some of the keys and values in the collection. Only keys that are greater than (and optionally, equal to) from are included. The keys are enumerated in sorted order. Keys equal to from can be included or excluded depending on the fromInclusive parameter.
Public method RangeTo
Returns a collection that can be used for enumerating some of the keys and values in the collection. Only items that are less than (and optionally, equal to) to are included. The items are enumerated in sorted order. Items equal to to can be included or excluded depending on the toInclusive parameter.
Public method Remove(TKey, TValue)
Removes a given value from the values associated with a key. If the last value is removed from a key, the key is removed also.
Public method Remove(TKey)
Removes a key and all associated values from the dictionary. If the key is not present in the dictionary, it is unchanged and false is returned.
Public method Reversed
Returns a View collection that can be used for enumerating the keys and values in the collection in reversed order.

Properties


  Name Description
Public property Count
Gets the number of key-value pairs in the dictionary. Each value associated with a given key is counted. If duplicate values are permitted, each duplicate value is included in the count.
Public property KeyComparer
Returns the IComparer<T> used to compare keys in this dictionary.
Public property KeyValuePairs
Gets a read-only collection of all key-value pairs in the dictionary. If a key has multiple values associated with it, then a key-value pair is present for each value associated with the key.
Public property ValueComparer
Returns the IComparer<T> used to compare values in this dictionary.