K
- the key typeV
- the value typepublic class HashMap<K,V> extends Object implements Map<K,V>, Serializable
Constructor and Description |
---|
HashMap() |
HashMap(Map<? extends K,? extends V> m) |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
boolean |
containsKey(Object key) |
boolean |
containsValue(Object value) |
protected void |
doReadObject(ObjectInputStream in)
Adapted from org.apache.commons.collections.map.AbstractHashedMap.
|
protected void |
doWriteObject(ObjectOutputStream out)
Adapted from org.apache.commons.collections.map.AbstractHashedMap.
|
Set<Map.Entry<K,V>> |
entrySet() |
boolean |
equals(Object o) |
V |
get(Object key) |
int |
hashCode() |
boolean |
isEmpty() |
protected boolean |
keyEquals(Object a,
Object b)
Returns whether two keys are equal for the purposes of this set.
|
protected int |
keyHashCode(Object k)
Returns the hashCode for a key.
|
Set<K> |
keySet() |
V |
put(K key,
V value) |
void |
putAll(Map<? extends K,? extends V> m) |
V |
remove(Object key) |
int |
size() |
String |
toString() |
protected boolean |
valueEquals(Object a,
Object b)
Returns whether two values are equal for the purposes of this set.
|
protected int |
valueHashCode(Object v)
Returns the hashCode for a value.
|
Collection<V> |
values() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
public boolean containsKey(Object key)
containsKey
in interface Map<K,V>
public boolean containsValue(Object value)
containsValue
in interface Map<K,V>
public int hashCode()
protected void doReadObject(ObjectInputStream in) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
protected void doWriteObject(ObjectOutputStream out) throws IOException
IOException
protected boolean keyEquals(Object a, Object b)
protected int keyHashCode(Object k)
protected boolean valueEquals(Object a, Object b)
protected int valueHashCode(Object v)
Copyright 2007-2014 Johan Hall, Jens Nilsson and Joakim Nivre.