java.lang.Object
org.hsqldb.map.BaseHashMap
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 inherited from class org.hsqldb.map.BaseHashMap
ACCESS_MAX, emptyObjectArray
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
get
(int index) Same as getValueAt(index).int
getKeyAt
(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.boolean
void
removeEntry
(int index) boolean
boolean
setValueAt
(int index, V value) Methods inherited from class org.hsqldb.lib.HashMap
containsKey, containsValue, entrySet, get, keySet, keysToArray, put, putAll, remove, values, valuesToArray
Methods inherited from class org.hsqldb.map.BaseHashMap
clear, clone, isEmpty, size
-
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
-