K - the key typeV - the value typepublic class SoftHashMap<K,V> extends AbstractMap<K,V>
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Constructor and Description |
|---|
SoftHashMap() |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clear the content of this map.
|
boolean |
containsKey(Object key)
Returns true if this map contains a mapping for the specified key.
|
boolean |
containsValue(Object value)
Returns true if this map maps one or more keys to the specified value.
|
Set<Map.Entry<K,V>> |
entrySet()
Returns a
Set view of the mappings contained in this map. |
V |
get(Object key)
Returns the value to which the specified key is mapped, or
null if this map contains no mapping for the key. |
boolean |
isEmpty()
Returns true if this map contains no key-value mappings.
|
Set<K> |
keySet()
Returns a
Set view of the keys contained in this map.. |
V |
put(K key,
V value)
Associates the specified value with the specified key in this map.
|
void |
putAll(Map<? extends K,? extends V> map)
Copies all of the mappings from the specified map to this map.
|
V |
remove(Object key)
Removes the mapping for a key from this map if it is present.
|
int |
size()
Return the size of this map.
|
Collection<V> |
values()
Return a collection view of the values contained in this map.
|
clone, equals, hashCode, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAllpublic V get(Object key)
null if this map contains no mapping for the key.public boolean containsKey(Object key)
containsKey in interface Map<K,V>containsKey in class AbstractMap<K,V>key - the keypublic boolean containsValue(Object value)
containsValue in interface Map<K,V>containsValue in class AbstractMap<K,V>value - the valuepublic void putAll(Map<? extends K,? extends V> map)
public boolean isEmpty()
public void clear()
public int size()
public Set<Map.Entry<K,V>> entrySet()
Set view of the mappings contained in this map.public Collection<V> values()