Module org.hsqldb
Package org.hsqldb.lib

## Class OrderedLongHashSet

- java.lang.Object
- - org.hsqldb.map.BaseHashMap
  - - org.hsqldb.lib.OrderedLongHashSet

-     public class OrderedLongHashSet
      extends org.hsqldb.map.BaseHashMap

  A list which is also a set of long primitives which maintains the insertion order of the elements 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 Summary

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

      `ACCESS_MAX, emptyObjectArray`

  - ### Constructor Summary

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

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `boolean` | `add​(long key)` |
    `boolean` | `addAll​(OrderedLongHashSet col)` |
    `boolean` | `contains​(long key)` |
    `long` | `get​(int index)` |
    `int` | `getIndex​(long value)` |
    `int` | `getOrderedStartMatchCount​(long[] array)` |
    `int` | `getStartMatchCount​(long[] array)` |
    `boolean` | `insert​(int index, long key)` |
    `PrimitiveIterator<java.lang.Long>` | `iterator()` |
    `boolean` | `remove​(long key)` |
    `void` | `removeEntry​(int index)` |
    `long[]` | `toArray()` |

    - ### 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`

- - ### Constructor Detail

    - #### OrderedLongHashSet

          public OrderedLongHashSet()

    - #### OrderedLongHashSet

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

      Throws:
        `java.lang.IllegalArgumentException`

  - ### Method Detail

    - #### contains

          public boolean contains​(long key)

    - #### add

          public boolean add​(long key)

    - #### insert

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

      Throws:
        `java.lang.IndexOutOfBoundsException`

    - #### remove

          public boolean remove​(long key)

    - #### removeEntry

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

      Throws:
        `java.lang.IndexOutOfBoundsException`

    - #### get

          public long get​(int index)

    - #### getIndex

          public int getIndex​(long value)

    - #### getStartMatchCount

          public int getStartMatchCount​(long[] array)

    - #### getOrderedStartMatchCount

          public int getOrderedStartMatchCount​(long[] array)

    - #### addAll

          public boolean addAll​(OrderedLongHashSet col)

    - #### toArray

          public long[] toArray()

    - #### iterator

          public PrimitiveIterator<java.lang.Long> iterator()