K
- key typeV
- value typepublic class HashMap<K,V> extends AbstractMap<K,V> implements Cloneable, Serializable
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
Constructor and Description |
---|
HashMap() |
HashMap(int ignored) |
HashMap(int ignored,
float alsoIgnored) |
HashMap(Map<? extends K,? extends V> toBeCopied) |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
Object |
clone() |
boolean |
containsKey(Object key) |
boolean |
containsValue(Object value) |
Set<Map.Entry<K,V>> |
entrySet() |
V |
get(Object key) |
protected V |
getStringValue(String key)
Returns the value for the given key in the stringMap.
|
protected boolean |
hasStringValue(String key)
Returns true if the given key exists in the stringMap.
|
V |
put(K key,
V value) |
protected V |
putStringValue(String key,
V value)
Sets the specified key to the specified value in the stringMap.
|
V |
remove(Object key) |
protected V |
removeStringValue(String key)
Removes the specified key from the stringMap and returns the value that was
previously there.
|
int |
size() |
public HashMap()
public HashMap(int ignored)
public HashMap(int ignored, float alsoIgnored)
public Object clone()
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 int size()
protected V getStringValue(String key)
null
if the specified key does not exist.protected boolean hasStringValue(String key)
protected V putStringValue(String key, V value)
null
if the specified
key did not exist.Copyright © 2018. All rights reserved.