public class HashMap<K,V> extends AbstractMap<K,V> implements Map<K,V>
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Constructor and Description |
|---|
HashMap() |
HashMap(int capacity) |
HashMap(int capacity,
float loadFactor) |
HashMap(Map<? extends K,? extends V> map) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
boolean |
containsKey(Object key) |
boolean |
containsValue(Object value) |
Set<Map.Entry<K,V>> |
entrySet() |
V |
get(Object key) |
boolean |
isEmpty() |
Set<K> |
keySet() |
V |
put(K key,
V value) |
void |
putAll(Map<? extends K,? extends V> map) |
V |
remove(Object key) |
int |
size() |
Collection<V> |
values() |
equals, hashCode, toStringcompute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAllpublic HashMap()
public HashMap(int capacity)
public HashMap(int capacity,
float loadFactor)
public void clear()
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 boolean isEmpty()
public int size()
public Collection<V> values()
Copyright © 2026. All rights reserved.