Class OrderedLongKeyHashMap<V>

java.lang.Object
org.hsqldb.lib.OrderedLongKeyHashMap<V>
All Implemented Interfaces:
Map<Long,V>

public class OrderedLongKeyHashMap<V> extends Object implements Map<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)
  • Field Details

    • ACCESS_MAX

      public static final int ACCESS_MAX
      See Also:
    • emptyObjectArray

      public static final Object[] emptyObjectArray
  • Constructor Details

  • Method Details

    • containsKey

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

      public boolean containsKey(long key)
    • containsValue

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

      public V get(Long key)
      Specified by:
      get in interface Map<Long,V>
    • get

      public V get(long key)
    • getKeyAt

      public long getKeyAt(int index)
    • getValueAt

      public V getValueAt(int index)
    • getSecondValueAt

      public Object getSecondValueAt(int index)
    • getThirdValueAt

      public Object getThirdValueAt(int index)
    • getFourthValueAt

      public Object getFourthValueAt(int index)
    • setValueAt

      public V setValueAt(int index, V value)
    • setSecondValueAt

      public Object setSecondValueAt(int index, Object value)
    • setThirdValueAt

      public Object setThirdValueAt(int index, Object value)
    • setFourthValueAt

      public Object setFourthValueAt(int index, Object value)
    • insert

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

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

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

      public int getIndex(long key)
    • put

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

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

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

      public V remove(long key)
    • removeEntry

      public void removeEntry(int index) throws IndexOutOfBoundsException
      Throws:
      IndexOutOfBoundsException
    • getLookup

      public int getLookup(long key)
    • putAll

      public void putAll(LongKeyHashMap<V> other)
    • keysToArray

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

      public Object[] valuesToArray()
    • valuesToArray

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

      public Set<Long> keySet()
      Specified by:
      keySet in interface Map<Long,V>
    • values

      public Collection<V> values()
      Specified by:
      values in interface Map<Long,V>
    • entrySet

      public Set<Map.Entry<Long,V>> entrySet()
      Specified by:
      entrySet in interface Map<Long,V>
    • clear

      public void clear()
      Clear the map completely.
    • size

      public int size()
    • isEmpty

      public boolean isEmpty()
    • clone

      public org.hsqldb.map.BaseHashMap clone()