Module org.hsqldb
Package org.hsqldb.lib

## Class OrderedIntKeyHashMap<V>

- java.lang.Object
- - org.hsqldb.map.BaseHashMap
  - - org.hsqldb.lib.IntKeyHashMap<V>
    - - org.hsqldb.lib.OrderedIntKeyHashMap<V>

- All Implemented Interfaces:
    `Map<java.lang.Integer,​V>`

      public class OrderedIntKeyHashMap<V>
      extends IntKeyHashMap<V>
      implements Map<java.lang.Integer,​V>

  A Map of int 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:
    2.0.0
  Author:
    Fred Toussi (fredt@users dot sourceforge.net)

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.hsqldb.lib.Map

      `Map.Entry<K,​V>`

  - ### Field Summary

    - ### Fields inherited from class org.hsqldb.map.BaseHashMap

      `ACCESS_MAX, emptyObjectArray`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `OrderedIntKeyHashMap()` |
    `OrderedIntKeyHashMap​(int initialCapacity)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `int` | `getIndex​(int key)` |
    `int` | `getKeyAt​(int lookup, int def)` |
    `java.lang.Object` | `getValueAt​(int index)` |
    `boolean` | `insert​(int index, int key, V value)` |
    `V` | `remove​(int key)` |
    `void` | `removeEntry​(int index)` |
    `boolean` | `set​(int index, int key, V value)` |
    `boolean` | `setKeyAt​(int index, int key)` |
    `java.lang.Object` | `setValueAt​(int index, java.lang.Object value)` |

    - ### Methods inherited from class org.hsqldb.lib.IntKeyHashMap

      `containsKey, containsKey, containsValue, entrySet, get, get, getKeyArray, getValueArray, keySet, keysToArray, put, put, putAll, remove, values, valuesToArray, valuesToArray`

    - ### Methods inherited from class org.hsqldb.map.BaseHashMap

      `clear, clone, isEmpty, size`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface org.hsqldb.lib.Map

      `clear, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, remove, size, values`

- - ### Constructor Detail

    - #### OrderedIntKeyHashMap

          public OrderedIntKeyHashMap()

    - #### OrderedIntKeyHashMap

          public OrderedIntKeyHashMap​(int initialCapacity)
                               throws java.lang.IllegalArgumentException

      Throws:
        `java.lang.IllegalArgumentException`

  - ### Method Detail

    - #### getKeyAt

          public int getKeyAt​(int lookup,
                              int def)

    - #### getValueAt

          public java.lang.Object getValueAt​(int index)

    - #### setValueAt

          public java.lang.Object setValueAt​(int index,
                                             java.lang.Object value)

    - #### set

          public boolean set​(int index,
                             int key,
                             V value)
                      throws java.lang.IndexOutOfBoundsException

      Throws:
        `java.lang.IndexOutOfBoundsException`

    - #### insert

          public boolean insert​(int index,
                                int key,
                                V value)
                         throws java.lang.IndexOutOfBoundsException

      Throws:
        `java.lang.IndexOutOfBoundsException`

    - #### setKeyAt

          public boolean setKeyAt​(int index,
                                  int key)
                           throws java.lang.IndexOutOfBoundsException

      Throws:
        `java.lang.IndexOutOfBoundsException`

    - #### getIndex

          public int getIndex​(int key)

    - #### remove

          public V remove​(int key)

      Overrides:
        `remove` in class `IntKeyHashMap<V>`

    - #### removeEntry

          public void removeEntry​(int index)
                           throws java.lang.IndexOutOfBoundsException

      Throws:
        `java.lang.IndexOutOfBoundsException`