RankedMapTKey, TValueIndexOfKey Method |
Namespace: Kaos.Collections
public int IndexOfKey( TKey key )
Exception | Condition |
---|---|
ArgumentNullException | When key is null. |
Elements with multiple occurrences of a key will return the occurrence with the lowest index. If an element containing key is not found, apply the bitwise complement operator (~) to the result to get the index of the next higher item.
This is a O(log n) operation.