* Creates a new SortedMap instance * * @param comparator - Optional function to compare values for sorting. * If not provided, entries are sorted by key only.
(comparator?: (a: TValue, b: TValue) => number)
| 17 | * If not provided, entries are sorted by key only. |
| 18 | */ |
| 19 | constructor(comparator?: (a: TValue, b: TValue) => number) { |
| 20 | this.map = new Map<TKey, TValue>() |
| 21 | this.sortedKeys = [] |
| 22 | this.comparator = comparator |
| 23 | } |
| 24 | |
| 25 | /** |
| 26 | * Finds the index where a key-value pair should be inserted to maintain sort order. |
nothing calls this directly
no outgoing calls
no test coverage detected