import { SortedMap } from "https://deno.land/x/rimbu@1.0.3/sorted/mod.ts";
Interfaces
A mutable | |
A context instance for a HashMap that acts as a factory for every instance of this type of collection. | |
A non-empty type-invariant immutable Map of key type K, and value type V. In the Map, each key has exactly one value, and the Map cannot contain duplicate keys. See the Map documentation and the SortedMap API documentation | |
Utility interface that provides higher-kinded types for this collection. |
import { type SortedMap } from "https://deno.land/x/rimbu@1.0.3/sorted/mod.ts";
A type-invariant immutable Map of key type K, and value type V. In the Map, each key has exactly one value, and the Map cannot contain duplicate keys. See the Map documentation and the SortedMap API documentation
Examples
Example 1
Example 1
const m1 = SortedMap.empty<number, string>()
const m2 = SortedMap.of([1, 'a'], [2, 'b'])
Methods
Returns a Stream of sorted entries of this collection within the given keyRange
.
Returns a Stream of sorted entries of this collection within the given range
index range.
Returns the entry with the minimum key of the SortedMap, or a fallback value (default: undefined) if the SortedMap is empty.
Returns the minimum key of the SortedMap, or a fallback value (default: undefined) if the SortedMap is empty.
Returns the value associated with the minimum key of the SortedMap, or a fallback value (default: undefined) if the SortedMap is empty.
Returns the entry with the maximum key of the SortedMap, or a fallback value (default: undefined) if the SortedMap is empty.
Returns the maximum key of the SortedMap, or a fallback value (default: undefined) if the SortedMap is empty.
Returns the value associated with the maximum key of the SortedMap, or a fallback value (default: undefined) if the SortedMap is empty.
Returns the entry with its key at the given index of the key sort order of the SortedMap, or a fallback value (default: undefined) if the index is out of bounds.
Returns the key at the given index of the key sort order of the SortedMap, or a fallback value (default: undefined) if the index is out of bounds.
Returns the value associated with the key at the given index of the key sort order of the SortedMap, or a fallback value (default: undefined) if the index is out of bounds.
Returns a SortedMap containing the the first amount
of elements of this SortedMap.
Returns a SortedMap containing all but the the first amount
of elements of this SortedMap.
Returns a SortedMap containing only those entries that are within the given range
index range of they key
sort order.
import { SortedMap } from "https://deno.land/x/rimbu@1.0.3/sorted/mod.ts";