java.lang.Object
org.hsqldb.map.BaseHashMap
org.hsqldb.lib.OrderedLongKeyHashMap<V>
A Map of long primitives to Object values 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.
- Since:
- 1.9.0
- 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
ConstructorsConstructorDescriptionOrderedLongKeyHashMap
(int initialCapacity) OrderedLongKeyHashMap
(int initialCapacity, boolean hasThirdValue) -
Method Summary
Modifier and TypeMethodDescriptionboolean
containsKey
(long key) boolean
containsKey
(Object key) boolean
containsValue
(Object value) entrySet()
get
(long key) int
getIndex
(long key) long
getKeyAt
(int index) int
getLookup
(long key) getSecondValueAt
(int index) getThirdValueAt
(int index) getValueAt
(int index) boolean
keySet()
long[]
keysToArray
(long[] array) void
putAll
(LongKeyHashMap other) void
remove
(long key) void
removeEntry
(int index) boolean
boolean
setKeyAt
(int index, long key) setSecondValueAt
(int index, Object value) setThirdValueAt
(int index, Object value) setValueAt
(int index, Object value) values()
Object[]
<T> T[]
valuesToArray
(T[] array) Methods inherited from class org.hsqldb.map.BaseHashMap
clear, clone, isEmpty, size
-
Constructor Details
-
OrderedLongKeyHashMap
public OrderedLongKeyHashMap() -
OrderedLongKeyHashMap
- Throws:
IllegalArgumentException
-
OrderedLongKeyHashMap
public OrderedLongKeyHashMap(int initialCapacity, boolean hasThirdValue) throws IllegalArgumentException - Throws:
IllegalArgumentException
-
-
Method Details
-
containsKey
- Specified by:
containsKey
in interfaceMap<Long,
V>
-
containsKey
public boolean containsKey(long key) -
containsValue
- Specified by:
containsValue
in interfaceMap<Long,
V>
-
get
-
get
-
getKeyAt
public long getKeyAt(int index) -
getValueAt
-
getSecondValueAt
-
getThirdValueAt
-
setValueAt
-
setSecondValueAt
-
setThirdValueAt
-
insert
- Throws:
IndexOutOfBoundsException
-
set
- Throws:
IndexOutOfBoundsException
-
setKeyAt
- Throws:
IndexOutOfBoundsException
-
getIndex
public int getIndex(long key) -
put
-
put
-
remove
-
remove
-
removeEntry
- Throws:
IndexOutOfBoundsException
-
getLookup
public int getLookup(long key) -
putAll
-
putAll
-
keysToArray
public long[] keysToArray(long[] array) -
valuesToArray
-
valuesToArray
public <T> T[] valuesToArray(T[] array) -
keySet
-
values
-
entrySet
-