K
- the key typeV
- the value typepublic interface ImmutableMap<K,V> extends Map<K,V>
Modifier and Type | Method and Description |
---|---|
static <K,V> ImmutableMap<K,V> |
empty() |
static <K,V> ImmutableMap<K,V> |
from(Map<K,V> map) |
ImmutableMap<K,V> |
removed(K key) |
static <K,V> ImmutableMap<K,V> |
singleton(K key,
V value) |
ImmutableMap<K,V> |
updated(K key,
V value) |
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
static <K,V> ImmutableMap<K,V> empty()
K
- the key typeV
- the value typestatic <K,V> ImmutableMap<K,V> singleton(K key, V value)
K
- the key typeV
- the value typekey
- the keyvalue
- the valuestatic <K,V> ImmutableMap<K,V> from(Map<K,V> map)
K
- the key typeV
- the value typemap
- the mapImmutableMap<K,V> updated(K key, V value)
key
- the keyvalue
- the valueImmutableMap<K,V> removed(K key)
key
- the key