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 TypeMethodDescriptionvoidstatic <E> OrderedHashSet<E>add(OrderedHashSet<E> first, E value) static <E> OrderedHashSet<E>addAll(OrderedHashSet<E> first, OrderedHashSet<E> second) get(int index) intgetCommonElementCount(Set<E> other) intintgetLargestIndex(OrderedHashSet<E> other) intgetSmallestIndex(OrderedHashSet<E> other) intbooleanintremove(int index) booleanreturns true if removedvoidremoveEntry(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, toStringMethods inherited from class org.hsqldb.map.BaseHashMap
clear, clone, isEmpty, sizeMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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:HashSetreturns 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:
getCommonElementCountin classHashSet<E>
-
addAll
-
add
-