public class EmptyMap<K,V> extends AbstractMap<K,V> implements Serializable
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
Constructor and Description |
---|
EmptyMap() |
Modifier and Type | Method and Description |
---|---|
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) |
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 k,
V defaultValue) |
int |
hashCode() |
boolean |
isEmpty() |
Set<K> |
keySet() |
V |
merge(K key,
V value,
BiFunction<? super V,? super V,? extends V> remappingFunction) |
V |
putIfAbsent(K key,
V value) |
boolean |
remove(Object key,
Object value) |
V |
replace(K key,
V value) |
boolean |
replace(K key,
V oldValue,
V newValue) |
void |
replaceAll(BiFunction<? super K,? super V,? extends V> function) |
int |
size() |
Collection<V> |
values() |
public static final EmptyMap<?,?> EMPTY
public int size()
public boolean isEmpty()
public boolean containsKey(Object key)
containsKey
in interface Map<K,V>
containsKey
in class AbstractMap<K,V>
public boolean containsValue(Object value)
containsValue
in interface Map<K,V>
containsValue
in class AbstractMap<K,V>
public Collection<V> values()
public boolean equals(Object o)
public int hashCode()
public V getOrDefault(Object k, 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>
Copyright © 2024. All rights reserved.