RankedDictionaryTKey, TValueKeyCollection Class |
Namespace: Kaos.Collections
public sealed class KeyCollection : ICollection<TKey>, IEnumerable<TKey>, IEnumerable, ICollection, IReadOnlyCollection<TKey>
The RankedDictionaryTKey, TValueKeyCollection generic type exposes the following members.
| Name | Description | |
|---|---|---|
| RankedDictionaryTKey, TValueKeyCollection | Initializes a new collection that reflects the keys of a RankedDictionaryTKey, TValue. |
| Name | Description | |
|---|---|---|
| Count | Gets the number of keys in the collection. | |
| Item | Gets the key at the supplied index. |
| Name | Description | |
|---|---|---|
| Contains | Determines whether the dictionary contains the supplied key. | |
| CopyTo | Copies keys to a supplied array, starting at the supplied position. | |
| ElementAt | Gets the key at the supplied index. | |
| ElementAtOrDefault | Gets the key at the supplied index or the default if the index is out of range. | |
| Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
| First | Gets the minimum key in the dictionary per the comparer. | |
| GetEnumerator | Gets an enumerator that iterates thru the collection. | |
| GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
| GetType | Gets the Type of the current instance. (Inherited from Object.) | |
| IndexOf | Gets the index of the supplied key. | |
| Last | Gets the maximum key in the dictionary per the comparer. | |
| Reverse | Returns an enumerator that iterates thru the dictionary keys in reverse order. | |
| Skip | Bypasses a supplied number of keys and yields the remaining keys. | |
| SkipWhile(FuncTKey, Boolean) |
Bypasses keys as long as a supplied condition is true and yields the remaining keys.
| |
| SkipWhile(FuncTKey, Int32, Boolean) |
Bypasses keys as long as a supplied index-based condition is true and yields the remaining keys.
| |
| ToString | Returns a string that represents the current object. (Inherited from Object.) | |
| TryGet | Gets the actual key for the supplied search key. | |
| TryGetGreaterThan | Gets the least key greater than the supplied key. | |
| TryGetGreaterThanOrEqual | Gets the least key greater than or equal to the supplied key. | |
| TryGetLessThan | Gets the greatest key less than the supplied key. | |
| TryGetLessThanOrEqual | Gets the greatest key that is less than or equal to the supplied key. |
| Name | Description | |
|---|---|---|
| ICollectionTKeyAdd | This implementation always throws a NotSupportedException. | |
| ICollectionTKeyClear | This implementation always throws a NotSupportedException. | |
| ICollectionTKeyContains | Determines whether the collection contains the supplied key. | |
| ICollectionCopyTo | Copies keys to a supplied array, starting at the supplied position. | |
| IEnumerableTKeyGetEnumerator | Gets an enumerator that iterates thru the collection. | |
| IEnumerableGetEnumerator | Gets an enumerator that iterates thru the collection. | |
| ICollectionTKeyIsReadOnly | Indicates that the collection is read-only. | |
| ICollectionIsSynchronized | Indicates that the collection is not thread safe. | |
| ICollectionTKeyRemove | This implementation always throws a NotSupportedException. | |
| ICollectionSyncRoot | Gets an object that can be used to synchronize access to the collection. |
This class emulates and extends SortedDictionaryTKey, TValueKeyCollection while significantly improving performance on large collections.
Optimized instance methods with the signatures of LINQ methods have been implemented:
Indexing enhancements include: