PBL - The program base library
C# AvlDictionary and Priority Queue implementation
|
Represents the collection of keys in an AvlDictionary<TKey,TValue>. This class cannot be inherited. More...
Classes | |
class | CollectionEnumerator |
Enumerates the elements of an AvlDictionary<TKey,TValue>.KeyCollection. This class cannot be inherited. More... | |
Public Member Functions | |
void | Add (TKey item) |
Because the KeyCollection is read only, this method always throws a System.NotSupportedException. | |
void | Clear () |
Because the KeyCollection is read only, this method always throws a System.NotSupportedException. | |
bool | Contains (TKey item) |
Determines whether the AvlDictionary.KeyCollection contains a specific item. | |
void | CopyTo (TKey[] array, int index) |
Copies the elements of the AvlDictionary.KeyCollection to an existing one-dimensional TKey[], starting at the specified array index. | |
bool | Remove (TKey item) |
Because the KeyCollection is read only, this method always throws a System.NotSupportedException. | |
IEnumerator< TKey > | GetEnumerator () |
Returns an enumerator that iterates through the AvlDictionary.KeyCollection. | |
void | CopyTo (Array array, int index) |
Copies the elements of the AvlDictionary.KeyCollection to an existing one-dimensional Array, starting at the specified array index. | |
![]() | |
AvlDictionary () | |
Initializes a new instance of the AvlDictionary<TKey,TValue> class that is empty. | |
AvlDictionary (IEnumerable< KeyValuePair< 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 index) |
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 | |
int | Count [get] |
Gets the number of elements contained in the AvlDictionary. | |
bool | IsReadOnly [get] |
Gets a value indicating whether the AvlDictionary.KeyCollection is read-only. | |
bool | IsSynchronized [get] |
Gets a value indicating whether access to the AvlDictionary.KeyCollection is synchronized (thread safe). | |
object | SyncRoot [get] |
Gets an object that can be used to synchronize access to the AvlDictionary. | |
![]() | |
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. | |
Represents the collection of keys in an AvlDictionary<TKey,TValue>. This class cannot be inherited.
Definition at line 860 of file AvlDictionary.cs.
void Com.Mission_Base.Pbl.AvlDictionary< TKey, TValue >.KeyCollection.Add | ( | TKey | item | ) |
Because the KeyCollection is read only, this method always throws a System.NotSupportedException.
System.NotSupportedException | The AvlDictionary.KeyCollection is read-only. |
Definition at line 937 of file AvlDictionary.cs.
void Com.Mission_Base.Pbl.AvlDictionary< TKey, TValue >.KeyCollection.Clear | ( | ) |
Because the KeyCollection is read only, this method always throws a System.NotSupportedException.
System.NotSupportedException | The AvlDictionary.KeyCollection is read-only. |
Definition at line 949 of file AvlDictionary.cs.
bool Com.Mission_Base.Pbl.AvlDictionary< TKey, TValue >.KeyCollection.Contains | ( | TKey | item | ) |
Determines whether the AvlDictionary.KeyCollection contains a specific item.
item | The TKey to locate in the AvlDictionary.KeyCollection. |
This method is an O(log N) operation, where N is the number of elements in the AvlDictionary.KeyCollection.
Definition at line 967 of file AvlDictionary.cs.
void Com.Mission_Base.Pbl.AvlDictionary< TKey, TValue >.KeyCollection.CopyTo | ( | TKey[] | array, |
int | index | ||
) |
Copies the elements of the AvlDictionary.KeyCollection to an existing one-dimensional TKey[], starting at the specified array index.
array | The one-dimensional TKey[] that is the destination of the elements copied from AvlDictionary.KeyCollection. The 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 | index is equal to or greater than the length of array. -or- The number of elements in the source AvlDictionary.KeyCollection is greater than the available space from index to the end of the destination array. |
Definition at line 997 of file AvlDictionary.cs.
void Com.Mission_Base.Pbl.AvlDictionary< TKey, TValue >.KeyCollection.CopyTo | ( | Array | array, |
int | index | ||
) |
Copies the elements of the AvlDictionary.KeyCollection to an existing one-dimensional Array, starting at the specified array index.
array | The one-dimensional Array that is the destination of the elements copied from AvlDictionary.KeyCollection. The 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 | index is equal to or greater than the length of array. -or- The number of elements in the source AvlDictionary.KeyCollection is greater than the available space from index to the end of the destination array. |
Definition at line 1127 of file AvlDictionary.cs.
IEnumerator<TKey> Com.Mission_Base.Pbl.AvlDictionary< TKey, TValue >.KeyCollection.GetEnumerator | ( | ) |
Returns an enumerator that iterates through the AvlDictionary.KeyCollection.
Definition at line 1077 of file AvlDictionary.cs.
bool Com.Mission_Base.Pbl.AvlDictionary< TKey, TValue >.KeyCollection.Remove | ( | TKey | item | ) |
Because the KeyCollection is read only, this method always throws a System.NotSupportedException.
System.NotSupportedException | The AvlDictionary.KeyCollection is read-only. |
Definition at line 1061 of file AvlDictionary.cs.
|
get |
Gets the number of elements contained in the AvlDictionary.
Definition at line 1038 of file AvlDictionary.cs.
|
get |
Gets a value indicating whether the AvlDictionary.KeyCollection is read-only.
Definition at line 1050 of file AvlDictionary.cs.
|
get |
Gets a value indicating whether access to the AvlDictionary.KeyCollection is synchronized (thread safe).
Definition at line 1167 of file AvlDictionary.cs.
|
get |
Gets an object that can be used to synchronize access to the AvlDictionary.
Definition at line 1179 of file AvlDictionary.cs.