AvlDictionary<TKey,TValue> is an implementation of the generic IDictionary<TKey,TValue> interface based on an AVL-tree. The AvlDictionary<TKey,TValue> represents a collection of key/value pairs that are sorted on the key. More...
Classes | |
| class | AvlDictionaryBaseEnumerator |
| Provides the common base functionality of all Enumerators used with an AvlDictionary<TKey,TValue>. More... | |
| class | AvlTreeNode |
| The actual AVL-tree code. It was lifted from the C implementation in pblSet.c. | |
| class | Enumerator |
| Enumerates the elements of an AvlDictionary<TKey,TValue>. More... | |
| class | KeyCollection |
| Represents the collection of keys in an AvlDictionary<TKey,TValue>. This class cannot be inherited. More... | |
| class | ValueCollection |
| Represents the collection of values in an AvlDictionary<TKey,TValue>. This class cannot be inherited. More... | |
Public Member Functions | |
| AvlDictionary () | |
| Initializes a new instance of the AvlDictionary<TKey,TValue> class that is empty. | |
| AvlDictionary (IDictionary< TKey, TValue > dictionary) | |
| Initializes a new instance of the AvlDictionary<TKey,TValue> class that contains elements copied from the specified System.Collections.Generic.IDictionary<TKey,TValue>. | |
| void | Add (TKey key, TValue value) |
| Adds the specified key and value to the AvlDictionary. | |
| bool | ContainsKey (TKey key) |
| Determines whether the AvlDictionary contains the specified key. | |
| bool | Remove (TKey key) |
| Removes the value with the specified key from the AvlDictionary. | |
| bool | TryGetValue (TKey key, out TValue value) |
| Gets the value associated with the specified key. | |
| void | Add (KeyValuePair< TKey, TValue > item) |
| Adds a KeyValuePair<TKey,TValue> to the AvlDictionary. | |
| void | Clear () |
| Removes all keys and values from the AvlDictionary. | |
| bool | Contains (KeyValuePair< TKey, TValue > item) |
| Determines whether the AvlDictionary contains a specific KeyValuePair<TKey,TValue>. | |
| void | CopyTo (KeyValuePair< TKey, TValue >[] array, int arrayIndex) |
| Copies the elements of the AvlDictionary to an existing one-dimensional KeyValuePair<TKey,TValue>[], starting at the specified array index. | |
| bool | Remove (KeyValuePair< TKey, TValue > item) |
| Removes the first occurrence of a specific KeyValuePair<TKey,TValue> from the AvlDictionary. | |
| IEnumerator< KeyValuePair < TKey, TValue > > | GetEnumerator () |
| Returns an enumerator that iterates through the AvlDictionary. | |
| void | CopyTo (Array array, int index) |
| Copies the elements of the elements of the AvlDictionary to an System.Array, starting at a particular System.Array index. | |
Properties | |
| ICollection< TKey > | Keys [get] |
| Gets a collection containing the keys in the AvlDictionary. | |
| ICollection< TValue > | Values [get] |
| Gets a collection containing the values in the AvlDictionary. | |
| TValue | this [TKey key] [get, set] |
| Gets or sets the value associated with the specified key. | |
| int | Count [get] |
| Gets the number of elements contained in the AvlDictionary. | |
| bool | IsReadOnly [get] |
| Gets a value indicating whether the AvlDictionary is read-only. | |
| bool | IsSynchronized [get] |
| Gets a value indicating whether access to the AvlDictionary is synchronized (thread safe). | |
| object | SyncRoot [get] |
| Gets an object that can be used to synchronize access to the AvlDictionary. | |
AvlDictionary<TKey,TValue> is an implementation of the generic IDictionary<TKey,TValue> interface based on an AVL-tree. The AvlDictionary<TKey,TValue> represents a collection of key/value pairs that are sorted on the key.
| TKey | The type of keys in the dictionary. | |
| TValue | The type of values in the dictionary. |
| TKey | : | IComparable<TKey> |
| Com.Mission_Base.Pbl.AvlDictionary< TKey, TValue >.AvlDictionary | ( | ) |
Initializes a new instance of the AvlDictionary<TKey,TValue> class that is empty.
| Com.Mission_Base.Pbl.AvlDictionary< TKey, TValue >.AvlDictionary | ( | IDictionary< TKey, TValue > | dictionary | ) |
Initializes a new instance of the AvlDictionary<TKey,TValue> class that contains elements copied from the specified System.Collections.Generic.IDictionary<TKey,TValue>.
| dictionary | The System.Collections.Generic.IDictionary<TKey,TValue> whose elements are copied to the new AvlDictionary<TKey,TValue>. |
This method is an O(N * log N) operation, where N is dictionary.Count.
| System.ArgumentNullException | dictionary is null. | |
| System.ArgumentException | dictionary contains one or more duplicate keys. |
| void Com.Mission_Base.Pbl.AvlDictionary< TKey, TValue >.Add | ( | KeyValuePair< TKey, TValue > | item | ) |
Adds a KeyValuePair<TKey,TValue> to the AvlDictionary.
| item | The KeyValuePair<TKey,TValue> to add to the AvlDictionary. |
This method is an O(log N) operation, where N is the number of elements in the AvlDictionary.
| System.NotSupportedException | The AvlDictionary is read-only. | |
| System.ArgumentException | An element with the same key already exists in the AvlDictionary. |
| void Com.Mission_Base.Pbl.AvlDictionary< TKey, TValue >.Add | ( | TKey | key, | |
| TValue | value | |||
| ) |
Adds the specified key and value to the AvlDictionary.
| key | The key of the element to add. | |
| value | The value of the element to add. The value can be null for reference types. |
This method is an O(log N) operation, where N is the number of elements in the AvlDictionary.
| System.ArgumentNullException | key is null. | |
| System.ArgumentException | An element with the same key already exists in the AvlDictionary. |
| void Com.Mission_Base.Pbl.AvlDictionary< TKey, TValue >.Clear | ( | ) |
Removes all keys and values from the AvlDictionary.
| System.NotSupportedException | The AvlDictionary is read-only. |
| bool Com.Mission_Base.Pbl.AvlDictionary< TKey, TValue >.Contains | ( | KeyValuePair< TKey, TValue > | item | ) |
Determines whether the AvlDictionary contains a specific KeyValuePair<TKey,TValue>.
| item | The KeyValuePair<TKey,TValue> to locate in the AvlDictionary. |
This method is an O(log N) operation, where N is the number of elements in the AvlDictionary.
| bool Com.Mission_Base.Pbl.AvlDictionary< TKey, TValue >.ContainsKey | ( | TKey | key | ) |
Determines whether the AvlDictionary contains the specified key.
| key | The key to locate in the AvlDictionary. |
This method is an O(log N) operation, where N is the number of elements in the AvlDictionary.
| System.ArgumentNullException | key is null. |
| void Com.Mission_Base.Pbl.AvlDictionary< TKey, TValue >.CopyTo | ( | Array | array, | |
| int | index | |||
| ) |
Copies the elements of the elements of the AvlDictionary to an System.Array, starting at a particular System.Array index.
| array | The one-dimensional System.Array that is the destination of the elements copied from AvlDictionary. The System.Array must have zero-based indexing. | |
| index | The zero-based index in array at which copying begins. |
| System.ArgumentNullException | array is null. | |
| System.ArgumentOutOfRangeException | index is less than zero. | |
| System.ArgumentException | array is multidimensional. -or- index is equal to or greater than the length of array. -or- The number of elements in the source AvlDictionary is greater than the available space from index to the end of the destination array. |
| void Com.Mission_Base.Pbl.AvlDictionary< TKey, TValue >.CopyTo | ( | KeyValuePair< TKey, TValue >[] | array, | |
| int | arrayIndex | |||
| ) |
Copies the elements of the AvlDictionary to an existing one-dimensional KeyValuePair<TKey,TValue>[], starting at the specified array index.
| array | The one-dimensional KeyValuePair<TKey,TValue>[] that is the destination of the elements copied from AvlDictionary. The array must have zero-based indexing. | |
| arrayIndex | The zero-based index in array at which copying begins. |
| System.ArgumentNullException | array is null. | |
| System.ArgumentOutOfRangeException | arrayIndex is less than zero. | |
| System.ArgumentException | arrayIndex is equal to or greater than the length of array. -or- The number of elements in the source AvlDictionary is greater than the available space from arrayIndex to the end of the destination array. |
| IEnumerator<KeyValuePair<TKey, TValue> > Com.Mission_Base.Pbl.AvlDictionary< TKey, TValue >.GetEnumerator | ( | ) |
Returns an enumerator that iterates through the AvlDictionary.
| bool Com.Mission_Base.Pbl.AvlDictionary< TKey, TValue >.Remove | ( | KeyValuePair< TKey, TValue > | item | ) |
Removes the first occurrence of a specific KeyValuePair<TKey,TValue> from the AvlDictionary.
| item | The KeyValuePair<TKey,TValue> to remove from the AvlDictionary. |
This method is an O(log N) operation, where N is the number of elements in the AvlDictionary.
| System.NotSupportedException | The AvlDictionary is read-only. |
| bool Com.Mission_Base.Pbl.AvlDictionary< TKey, TValue >.Remove | ( | TKey | key | ) |
Removes the value with the specified key from the AvlDictionary.
| key | The key of the element to remove. |
This method is an O(log N) operation, where N is the number of elements in the AvlDictionary.
| System.ArgumentNullException | key is null. | |
| System.NotSupportedException | "The AvlDictionary is read-only." |
| bool Com.Mission_Base.Pbl.AvlDictionary< TKey, TValue >.TryGetValue | ( | TKey | key, | |
| out TValue | value | |||
| ) |
Gets the value associated with the specified key.
| key | The key of the value to get. | |
| value | When this method returns, contains the value associated with the specified key, if the key is found; otherwise, the default value for the type of the value parameter. This parameter is passed uninitialized. |
This method is an O(log N) operation, where N is the number of elements in the AvlDictionary.
| System.ArgumentNullException | key is null. |
int Com.Mission_Base.Pbl.AvlDictionary< TKey, TValue >.Count [get] |
Gets the number of elements contained in the AvlDictionary.
bool Com.Mission_Base.Pbl.AvlDictionary< TKey, TValue >.IsReadOnly [get] |
Gets a value indicating whether the AvlDictionary is read-only.
bool Com.Mission_Base.Pbl.AvlDictionary< TKey, TValue >.IsSynchronized [get] |
Gets a value indicating whether access to the AvlDictionary is synchronized (thread safe).
ICollection<TKey> Com.Mission_Base.Pbl.AvlDictionary< TKey, TValue >.Keys [get] |
Gets a collection containing the keys in the AvlDictionary.
object Com.Mission_Base.Pbl.AvlDictionary< TKey, TValue >.SyncRoot [get] |
Gets an object that can be used to synchronize access to the AvlDictionary.
TValue Com.Mission_Base.Pbl.AvlDictionary< TKey, TValue >.this[TKey key] [get, set] |
Gets or sets the value associated with the specified key.
| key | The key of the value to get or set. |
This method is an O(log N) operation, where N is the number of elements in the AvlDictionary.
| System.ArgumentNullException | key is null. | |
| System.Collections.Generic.KeyNotFoundException | The property is retrieved and key does not exist in the collection. | |
| System.Collections.Generic.NotSupportedException | The property is set and the AvlDictionary is read-only. |
ICollection<TValue> Com.Mission_Base.Pbl.AvlDictionary< TKey, TValue >.Values [get] |
Gets a collection containing the values in the AvlDictionary.
1.6.1