java.lang.Object
org.hsqldb.map.BaseHashMap
org.hsqldb.lib.HashSet<E>
org.hsqldb.lib.OrderedHashSet<E>
- All Implemented Interfaces:
Collection<E>
,List<E>
,Set<E>
A list which is also a Set which maintains the inserted order of elements and
allows access by index. Iterators return the elements in the index order.
This class does not store null elements.
- 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
ConstructorsConstructorDescriptionOrderedHashSet
(int initialCapacity) OrderedHashSet
(int initialCapacity, ObjectComparator<E> comparator) OrderedHashSet
(Object[] valueList) -
Method Summary
Modifier and TypeMethodDescriptionvoid
static <E> OrderedHashSet
<E> add
(OrderedHashSet<E> first, E value) static <E> OrderedHashSet
<E> addAll
(OrderedHashSet<E> first, OrderedHashSet<E> second) get
(int index) int
getCommonElementCount
(Set<E> other) int
int
getLargestIndex
(OrderedHashSet<E> other) int
getSmallestIndex
(OrderedHashSet<E> other) int
boolean
int
remove
(int index) boolean
returns true if removedvoid
removeEntry
(int index) Object[]
toArray()
<T> T[]
toArray
(T[] array) Methods inherited from class org.hsqldb.lib.HashSet
add, addAll, addAll, addAll, contains, containsAll, get, getOrAdd, iterator, removeAll, removeAll, retainAll, toString
Methods inherited from class org.hsqldb.map.BaseHashMap
clear, clone, isEmpty, size
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.hsqldb.lib.Collection
addAll, clear, contains
-
Constructor Details
-
OrderedHashSet
public OrderedHashSet() -
OrderedHashSet
public OrderedHashSet(int initialCapacity) -
OrderedHashSet
-
OrderedHashSet
-
-
Method Details
-
remove
Description copied from class:HashSet
returns true if removed -
remove
-
removeEntry
- Throws:
IndexOutOfBoundsException
-
insert
- Throws:
IndexOutOfBoundsException
-
set
-
add
-
get
-
toArray
-
toArray
public <T> T[] toArray(T[] array) -
indexOf
-
getIndex
-
lastIndexOf
-
getLargestIndex
-
getSmallestIndex
-
getCommonElementCount
- Overrides:
getCommonElementCount
in classHashSet<E>
-
addAll
-
add
-