Skip to main content

CommonMapGetOrInsert

Callable

  • CommonMapGetOrInsert<K, V>(map, key, defaultValue): V

  • Push a new value into a map of arrays

    A backport of Map.getOrInsert


    Parameters

    • map: Map<K, V>
    • key: K
    • defaultValue: V

    Returns V