Skip to main content

namespace MultiMap

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

Companion interface: MultiMap<K,V>

Interfaces

NameDescription
MultiMap.Builder<K,V>A mutable MultiMap builder used to efficiently create new immutable instances. See the MultiMap documentation and the MultiMap.Builder API documentation
MultiMap.Context<UK,UV>A context instance for MultiMap implementations that acts as a factory for every instance of this type of collection.
MultiMap.NonEmpty<K,V>A non-empty type-invariant immutable MultiMap of key type K, and value type V. In the Map, each key has at least one value. See the MultiMap documentation and the MultiMap API documentation
MultiMap.TypesUtility interface that provides higher-kinded types for this collection.

Static Methods

createContext

Returns a new MultiMap context instance based on the given options.

Definition

createContext<UK, UV>(options: {
    keyMapContext: RMap.Context<UK>;
    keyMapValuesContext: RSet.Context<UV>;
  }): MultiMap.Context<UK, UV>;

Type parameters

NameDescription
UKthe upper key type for which the context can create instances
UVthe upper value type for which the context can create instances

Parameters

NameTypeDescription
options{
    keyMapContext: RMap.Context<UK>;
    keyMapValuesContext: RSet.Context<UV>;
  }
an object containing the following properties:
- keyMapContext: the map context to use for key to valueset mappings
- keyMapValuesContext: the set context to use for value sets