- java.lang.Object
-
- org.hsqldb.map.BaseHashMap
-
- org.hsqldb.lib.IntHashSet
-
- org.hsqldb.lib.OrderedIntHashSet
-
public class OrderedIntHashSet extends IntHashSet
A list which is also a set of int primitives which maintains the insertion order of the elements and allows access by index. Iterators return the keys in the index order.- Since:
- 1.9.0
- Author:
- Fred Toussi (fredt@users dot sourceforge.net)
-
-
Constructor Summary
Constructors Constructor Description OrderedIntHashSet()
OrderedIntHashSet(int initialCapacity)
OrderedIntHashSet(int[] elements)
OrderedIntHashSet(int[] elementsA, int[] elementsB)
OrderedIntHashSet(int[] elementsA, int[] elementsB, int[] elementsC)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
addAll(OrderedIntHashSet set)
int
get(int index)
int
getIndex(int value)
int
getOrderedStartMatchCount(int[] array)
boolean
insert(int index, int key)
boolean
remove(int key)
void
removeEntry(int index)
-
Methods inherited from class org.hsqldb.lib.IntHashSet
add, add, addAll, addAll, addAll, contains, contains, containsAll, getStartMatchCount, iterator, removeAll, retainAll, toArray, toArray
-
-
-
-
Constructor Detail
-
OrderedIntHashSet
public OrderedIntHashSet()
-
OrderedIntHashSet
public OrderedIntHashSet(int initialCapacity) throws java.lang.IllegalArgumentException
- Throws:
java.lang.IllegalArgumentException
-
OrderedIntHashSet
public OrderedIntHashSet(int[] elements)
-
OrderedIntHashSet
public OrderedIntHashSet(int[] elementsA, int[] elementsB)
-
OrderedIntHashSet
public OrderedIntHashSet(int[] elementsA, int[] elementsB, int[] elementsC)
-
-
Method Detail
-
insert
public boolean insert(int index, int key) throws java.lang.IndexOutOfBoundsException
- Throws:
java.lang.IndexOutOfBoundsException
-
remove
public boolean remove(int key)
- Overrides:
remove
in classIntHashSet
-
removeEntry
public void removeEntry(int index) throws java.lang.IndexOutOfBoundsException
- Throws:
java.lang.IndexOutOfBoundsException
-
get
public int get(int index)
-
getIndex
public int getIndex(int value)
-
getOrderedStartMatchCount
public int getOrderedStartMatchCount(int[] array)
-
addAll
public boolean addAll(OrderedIntHashSet set)
-
-