Skip to main content

interface SortedMultiMapHashValue<K,V>

A type-invariant immutable MultiMap of key type K, and value type V. In the MultiMap, each key has at least one value. See the MultiMap documentation and the SortedMultiMapHashValue API documentation

Companion namespace: SortedMultiMapHashValue

Implemented by: SortedMultiMapHashValue.NonEmpty<K,V>

Type parameters

NameDescription
Kthe key type
Vthe value type
note
  • The SortedMultiMapHashValue uses the contexts' SortedMap keyContext to hash the keys - The SortedMultiMapHashValue uses the contexts' HashSet valueContext to collect the values for each key.
example
const m1 = SortedMultiMapHashValue.empty<number, string>()
const m2 = SortedMultiMapHashValue.of([1, 'a'], [1, 'b'], [2, 'a'])