Module org.hsqldb

Class OrderedLongKeyHashMap<V>

  • All Implemented Interfaces:
    Map<java.lang.Long,​V>

    public class OrderedLongKeyHashMap<V>
    extends org.hsqldb.map.BaseHashMap
    implements Map<java.lang.Long,​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)
    • Constructor Detail

      • OrderedLongKeyHashMap

        public OrderedLongKeyHashMap()
      • OrderedLongKeyHashMap

        public OrderedLongKeyHashMap​(int initialCapacity)
                              throws java.lang.IllegalArgumentException
        Throws:
        java.lang.IllegalArgumentException
      • OrderedLongKeyHashMap

        public OrderedLongKeyHashMap​(int initialCapacity,
                                     boolean hasThirdValue)
                              throws java.lang.IllegalArgumentException
        Throws:
        java.lang.IllegalArgumentException
    • Method Detail

      • containsKey

        public boolean containsKey​(java.lang.Object key)
        Specified by:
        containsKey in interface Map<java.lang.Long,​V>
      • containsKey

        public boolean containsKey​(long key)
      • containsValue

        public boolean containsValue​(java.lang.Object value)
        Specified by:
        containsValue in interface Map<java.lang.Long,​V>
      • get

        public V get​(java.lang.Object key)
        Specified by:
        get in interface Map<java.lang.Long,​V>
      • get

        public V get​(long key)
      • getKeyAt

        public long getKeyAt​(int index)
      • getValueAt

        public V getValueAt​(int index)
      • getSecondValueAt

        public java.lang.Object getSecondValueAt​(int index)
      • getThirdValueAt

        public java.lang.Object getThirdValueAt​(int index)
      • setValueAt

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

        public java.lang.Object setSecondValueAt​(int index,
                                                 java.lang.Object value)
      • setThirdValueAt

        public java.lang.Object setThirdValueAt​(int index,
                                                java.lang.Object value)
      • insert

        public boolean insert​(int index,
                              long key,
                              V value)
                       throws java.lang.IndexOutOfBoundsException
        Throws:
        java.lang.IndexOutOfBoundsException
      • set

        public boolean set​(int index,
                           long key,
                           V value)
                    throws java.lang.IndexOutOfBoundsException
        Throws:
        java.lang.IndexOutOfBoundsException
      • setKeyAt

        public boolean setKeyAt​(int index,
                                long key)
                         throws java.lang.IndexOutOfBoundsException
        Throws:
        java.lang.IndexOutOfBoundsException
      • getIndex

        public int getIndex​(long key)
      • put

        public V put​(java.lang.Long key,
                     V value)
        Specified by:
        put in interface Map<java.lang.Long,​V>
      • put

        public V put​(long key,
                     V value)
      • remove

        public V remove​(java.lang.Object key)
        Specified by:
        remove in interface Map<java.lang.Long,​V>
      • remove

        public V remove​(long key)
      • removeEntry

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

        public int getLookup​(long key)
      • putAll

        public void putAll​(Map<? extends java.lang.Long,​? extends V> other)
        Specified by:
        putAll in interface Map<java.lang.Long,​V>
      • keysToArray

        public long[] keysToArray​(long[] array)
      • valuesToArray

        public java.lang.Object[] valuesToArray()
      • valuesToArray

        public <T> T[] valuesToArray​(T[] array)
      • keySet

        public Set<java.lang.Long> keySet()
        Specified by:
        keySet in interface Map<java.lang.Long,​V>
      • entrySet

        public Set<Map.Entry<java.lang.Long,​V>> entrySet()
        Specified by:
        entrySet in interface Map<java.lang.Long,​V>