public class PCollectionsImmutableMap<K,V> extends Object implements ImmutableMap<K,V>
| Constructor and Description |
|---|
PCollectionsImmutableMap(org.pcollections.HashPMap<K,V> map) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
V |
compute(K key,
BiFunction<? super K,? super V,? extends V> remappingFunction) |
V |
computeIfAbsent(K key,
Function<? super K,? extends V> mappingFunction) |
V |
computeIfPresent(K key,
BiFunction<? super K,? super V,? extends V> remappingFunction) |
boolean |
containsKey(Object key) |
boolean |
containsValue(Object value) |
static <K,V> PCollectionsImmutableMap<K,V> |
empty() |
Set<Map.Entry<K,V>> |
entrySet() |
boolean |
equals(Object o) |
void |
forEach(BiConsumer<? super K,? super V> action) |
V |
get(Object key) |
V |
getOrDefault(Object key,
V defaultValue) |
int |
hashCode() |
boolean |
isEmpty() |
Set<K> |
keySet() |
V |
merge(K key,
V value,
BiFunction<? super V,? super V,? extends V> remappingFunction) |
V |
put(K key,
V value) |
void |
putAll(Map<? extends K,? extends V> m) |
V |
putIfAbsent(K key,
V value) |
V |
remove(Object key) |
boolean |
remove(Object key,
Object value) |
ImmutableMap<K,V> |
removed(K key) |
V |
replace(K key,
V value) |
boolean |
replace(K key,
V oldValue,
V newValue) |
void |
replaceAll(BiFunction<? super K,? super V,? extends V> function) |
static <K,V> PCollectionsImmutableMap<K,V> |
singleton(K key,
V value) |
int |
size() |
String |
toString() |
ImmutableMap<K,V> |
updated(K key,
V value) |
Collection<V> |
values() |
public static <K,V> PCollectionsImmutableMap<K,V> empty()
empty in interface ImmutableMap<K,V>K - the key typeV - the value typepublic static <K,V> PCollectionsImmutableMap<K,V> singleton(K key, V value)
singleton in interface ImmutableMap<K,V>K - the key typeV - the value typekey - the keyvalue - the valuepublic ImmutableMap<K,V> updated(K key, V value)
updated in interface ImmutableMap<K,V>key - the keyvalue - the valuepublic ImmutableMap<K,V> removed(K key)
removed in interface ImmutableMap<K,V>key - the keypublic boolean containsKey(Object key)
containsKey in interface Map<K,V>public boolean containsValue(Object value)
containsValue in interface Map<K,V>public boolean equals(Object o)
public int hashCode()
public V getOrDefault(Object key, V defaultValue)
getOrDefault in interface Map<K,V>public void forEach(BiConsumer<? super K,? super V> action)
public void replaceAll(BiFunction<? super K,? super V,? extends V> function)
replaceAll in interface Map<K,V>public V computeIfAbsent(K key, Function<? super K,? extends V> mappingFunction)
computeIfAbsent in interface Map<K,V>public V computeIfPresent(K key, BiFunction<? super K,? super V,? extends V> remappingFunction)
computeIfPresent in interface Map<K,V>