Module org.hsqldb

Class 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)
    • 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)
      • removeEntry

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