Class OrderedHashMap<K,V>
java.lang.Object
org.hsqldb.lib.HashMap<K,V>
org.hsqldb.lib.OrderedHashMap<K,V>
- All Implemented Interfaces:
Map<K,V>
A Map which maintains the insertion order of the key/value pairs and allows
access by index. Iterators return the keys or values in the index order.
This class does not store null keys.
- Since:
- 1.7.2
- Author:
- Fred Toussi (fredt@users dot sourceforge.net)
-
Nested Class Summary
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanvoidclear()Clear the map completely.org.hsqldb.map.BaseHashMapclone()get(int index) Same as getValueAt(index).intgetKeyAt(int index) Returns the key stored in the entry at index position.getValueAt(int index) Returns the value stored in the entry at index position.booleanbooleanisEmpty()voidremoveEntry(int index) booleanbooleansetValueAt(int index, V value) intsize()Methods inherited from class HashMap
containsKey, containsValue, entrySet, get, keySet, keysToArray, put, putAll, remove, values, valuesToArray
-
Field Details
-
ACCESS_MAX
public static final int ACCESS_MAX- See Also:
-
emptyObjectArray
-
-
Constructor Details
-
OrderedHashMap
public OrderedHashMap() -
OrderedHashMap
- Throws:
IllegalArgumentException
-
-
Method Details
-
getKeyAt
Returns the key stored in the entry at index position.- Parameters:
index- the index of the entry- Returns:
- the value stored in the entry
- Throws:
IndexOutOfBoundsException- for invalid argument
-
getValueAt
Returns the value stored in the entry at index position.- Parameters:
index- the index of the entry- Returns:
- the value stored in the entry
- Throws:
IndexOutOfBoundsException- for invalid argument
-
get
Same as getValueAt(index).- Parameters:
index- the index of the entry- Returns:
- the value stored in the entry
- Throws:
IndexOutOfBoundsException- for invalid argument
-
remove
-
removeEntry
- Throws:
IndexOutOfBoundsException
-
add
-
setValueAt
- Throws:
IndexOutOfBoundsException
-
insert
- Throws:
IndexOutOfBoundsException
-
set
- Throws:
IndexOutOfBoundsException
-
setKeyAt
- Throws:
IndexOutOfBoundsException
-
getIndex
-
clear
public void clear()Clear the map completely. -
size
public int size() -
isEmpty
public boolean isEmpty() -
clone
public org.hsqldb.map.BaseHashMap clone()
-