Function<K,V>
, Object2ObjectFunction<K,V>
, Object2ObjectMap<K,V>
, java.io.Serializable
, java.util.function.Function<K,V>
, java.util.Map<K,V>
Object2ObjectSortedMaps.UnmodifiableSortedMap
public static class Object2ObjectMaps.UnmodifiableMap<K,V> extends Object2ObjectFunctions.UnmodifiableFunction<K,V> implements Object2ObjectMap<K,V>, java.io.Serializable
Object2ObjectMap.Entry<K,V>, Object2ObjectMap.FastEntrySet<K,V>
Modifier and Type | Method | Description |
---|---|---|
V |
compute(K key,
java.util.function.BiFunction<? super K,? super V,? extends V> remappingFunction) |
|
V |
computeIfPresent(K key,
java.util.function.BiFunction<? super K,? super V,? extends V> remappingFunction) |
|
boolean |
containsValue(java.lang.Object v) |
|
ObjectSet<java.util.Map.Entry<K,V>> |
entrySet() |
Returns a set view of the mappings contained in this map.
|
boolean |
equals(java.lang.Object o) |
|
void |
forEach(java.util.function.BiConsumer<? super K,? super V> action) |
|
V |
getOrDefault(java.lang.Object key,
V defaultValue) |
|
int |
hashCode() |
|
boolean |
isEmpty() |
|
ObjectSet<K> |
keySet() |
|
V |
merge(K key,
V value,
java.util.function.BiFunction<? super V,? super V,? extends V> remappingFunction) |
|
ObjectSet<Object2ObjectMap.Entry<K,V>> |
object2ObjectEntrySet() |
Returns a type-specific set view of the mappings contained in this map.
|
void |
putAll(java.util.Map<? extends K,? extends V> m) |
|
V |
putIfAbsent(K key,
V value) |
|
boolean |
remove(java.lang.Object key,
java.lang.Object value) |
|
V |
replace(K key,
V value) |
|
boolean |
replace(K key,
V oldValue,
V newValue) |
|
void |
replaceAll(java.util.function.BiFunction<? super K,? super V,? extends V> function) |
|
ObjectCollection<V> |
values() |
get
clear, containsKey, defaultReturnValue, defaultReturnValue, get, put, remove, size, toString
clear, containsKey, defaultReturnValue, defaultReturnValue, put, remove, size
public boolean containsValue(java.lang.Object v)
public ObjectSet<Object2ObjectMap.Entry<K,V>> object2ObjectEntrySet()
Object2ObjectMap
This method is necessary because there is no inheritance along type
parameters: it is thus impossible to strengthen Map.entrySet()
so
that it returns an ObjectSet
of
type-specific entries (the latter makes it possible to access keys and values
with type-specific methods).
object2ObjectEntrySet
in interface Object2ObjectMap<K,V>
Map.entrySet()
public ObjectSet<java.util.Map.Entry<K,V>> entrySet()
Note that this specification strengthens the one given in
Map.entrySet()
.
public ObjectSet<K> keySet()
Object2ObjectMap
Note that this specification strengthens the one given in
Map.keySet()
.
public ObjectCollection<V> values()
Object2ObjectMap
Note that this specification strengthens the one given in
Map.values()
.
public int hashCode()
public boolean equals(java.lang.Object o)
public void replaceAll(java.util.function.BiFunction<? super K,? super V,? extends V> function)
public boolean remove(java.lang.Object key, java.lang.Object value)
public V computeIfPresent(K key, java.util.function.BiFunction<? super K,? super V,? extends V> remappingFunction)
public V compute(K key, java.util.function.BiFunction<? super K,? super V,? extends V> remappingFunction)