- java.lang.Object
-
- org.hsqldb.map.BaseHashMap
-
- org.hsqldb.lib.HashMap<K,V>
-
- All Implemented Interfaces:
Map<K,V>
- Direct Known Subclasses:
OrderedHashMap
public class HashMap<K,V> extends org.hsqldb.map.BaseHashMap implements Map<K,V>
This class does not store null keys.- Since:
- 1.7.2
- Author:
- Fred Toussi (fredt@users dot sourceforge.net)
-
-
Constructor Summary
Constructors Constructor Description HashMap()
HashMap(int initialCapacity)
HashMap(int initialCapacity, ObjectComparator<K> comparator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
containsKey(java.lang.Object key)
boolean
containsValue(java.lang.Object value)
Set<Map.Entry<K,V>>
entrySet()
V
get(java.lang.Object key)
Set<K>
keySet()
<T> T[]
keysToArray(T[] array)
V
put(K key, V value)
void
putAll(Map<K,V> m)
V
remove(java.lang.Object key)
boolean
remove(K key, V value)
Removes the spacific key, value pair.Collection<V>
values()
<T> T[]
valuesToArray(T[] array)
-
-
-
Constructor Detail
-
HashMap
public HashMap()
-
HashMap
public HashMap(int initialCapacity) throws java.lang.IllegalArgumentException
- Throws:
java.lang.IllegalArgumentException
-
HashMap
public HashMap(int initialCapacity, ObjectComparator<K> comparator) throws java.lang.IllegalArgumentException
- Throws:
java.lang.IllegalArgumentException
-
-
Method Detail
-
containsKey
public boolean containsKey(java.lang.Object key)
- Specified by:
containsKey
in interfaceMap<K,V>
-
containsValue
public boolean containsValue(java.lang.Object value)
- Specified by:
containsValue
in interfaceMap<K,V>
-
remove
public boolean remove(K key, V value)
Removes the spacific key, value pair.- Parameters:
key
- the keyvalue
- the value- Returns:
- the value associated with the key, or null if none
-
keysToArray
public <T> T[] keysToArray(T[] array)
-
valuesToArray
public <T> T[] valuesToArray(T[] array)
-
-