Class KeyMultiMap<K, V, I, L>

MultiMap that transforms keys.

Type Parameters

  • K

    Input key type.

  • V

    Value type.

  • I

    Indexable key type.

  • L = K

    Lookup key type.

Hierarchy (view full)

Implements

  • Iterable<[key: K, value: V]>

Constructors

Accessors

Methods

  • Iterate over key-value pairs.

    Returns IterableIterator<[key: K, value: V], any, any>

  • Add a key-value pair. Values are stored in a Set, so duplicates are skipped.

    Parameters

    • key: K
    • value: V

    Returns number

    count(key) after the operation.

  • Iterate over key and associated values.

    Returns IterableIterator<[key: K, values: ReadonlySet<V>], any, any>

  • Remove a key-value pair. No-op if key-value does not exist.

    Parameters

    • key: K | L
    • value: V

    Returns number

    count(key) after the operation.