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