org.hsqldb.lib
Class OrderedHashSet
- java.lang.Object
-
- org.hsqldb.map.BaseHashMap
-
- org.hsqldb.lib.HashSet
-
- org.hsqldb.lib.OrderedHashSet
-
- All Implemented Interfaces:
- Collection, HsqlList, Set
public class OrderedHashSet extends HashSet implements HsqlList, Set
Implementation of an ordered 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
-
-
Field Summary
-
Fields inherited from class org.hsqldb.map.BaseHashMap
ACCESS_MAX, emptyObjectArray
-
-
Constructor Summary
Constructors Constructor and Description OrderedHashSet()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidadd(int index, java.lang.Object key)static OrderedHashSetadd(OrderedHashSet first, java.lang.Object value)static OrderedHashSetaddAll(OrderedHashSet first, OrderedHashSet second)java.lang.Objectget(int index)intgetCommonElementCount(Set other)intgetIndex(java.lang.Object key)intgetLargestIndex(OrderedHashSet other)intgetSmallestIndex(OrderedHashSet other)booleaninsert(int index, java.lang.Object key)java.lang.Objectremove(int index)booleanremove(java.lang.Object key)returns true if removedjava.lang.Objectset(int index, java.lang.Object key)voidtoArray(java.lang.Object[] array)-
Methods inherited from class org.hsqldb.lib.HashSet
add, addAll, addAll, addAll, contains, containsAll, get, iterator, removeAll, removeAll, setComparator, toArray, toString
-
Methods inherited from class org.hsqldb.map.BaseHashMap
capacity, clear, getAccessCountCeiling, incrementAccessCount, isEmpty, setAccessCountFloor, size
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.hsqldb.lib.Set
add, clear, contains, equals, get, hashCode, isEmpty, iterator, size
-
Methods inherited from interface org.hsqldb.lib.Collection
addAll
-
-
-
-
Method Detail
-
remove
public boolean remove(java.lang.Object key)
Description copied from class:HashSetreturns true if removed
-
remove
public java.lang.Object remove(int index) throws java.lang.IndexOutOfBoundsException
-
insert
public boolean insert(int index, java.lang.Object key) throws java.lang.IndexOutOfBoundsException- Throws:
java.lang.IndexOutOfBoundsException
-
set
public java.lang.Object set(int index, java.lang.Object key) throws java.lang.IndexOutOfBoundsException
-
add
public void add(int index, java.lang.Object key) throws java.lang.IndexOutOfBoundsException
-
get
public java.lang.Object get(int index) throws java.lang.IndexOutOfBoundsException
-
getIndex
public int getIndex(java.lang.Object key)
-
getLargestIndex
public int getLargestIndex(OrderedHashSet other)
-
getSmallestIndex
public int getSmallestIndex(OrderedHashSet other)
-
getCommonElementCount
public int getCommonElementCount(Set other)
-
addAll
public static OrderedHashSet addAll(OrderedHashSet first, OrderedHashSet second)
-
add
public static OrderedHashSet add(OrderedHashSet first, java.lang.Object value)
-
-
DataMelt 3.0 © DataMelt by jWork.ORG