RankedMapTKey, TValueElementsBetweenIndexes Method |
Namespace: Kaos.Collections
public IEnumerable<KeyValuePair<TKey, TValue>> ElementsBetweenIndexes( int lowerIndex, int upperIndex )
| Exception | Condition |
|---|---|
| ArgumentOutOfRangeException | When lowerIndex is less than zero or not less than the number of elements. |
| ArgumentOutOfRangeException | When upperIndex is less than zero or not less than the number of elements. |
| ArgumentException | When lowerIndex and upperIndex do not denote a valid range of elements in the map. |
| InvalidOperationException | When the map was modified after the enumerator was created. |
Index bounds are inclusive.
Retrieving the initial item is a O(log n) operation. Retrieving each subsequent item is a O(1) operation.