java.lang.Object
org.hsqldb.map.BaseHashMap
org.hsqldb.lib.HashSet<E>
- All Implemented Interfaces:
Collection<E>,Set<E>
- Direct Known Subclasses:
OrderedHashSet
This class does not store null keys.
- Since:
- 1.7.2
- Author:
- Fred Toussi (fredt@users dot sourceforge.net)
-
Field Summary
Fields inherited from class org.hsqldb.map.BaseHashMap
ACCESS_MAX, emptyObjectArray -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanreturns true if element is addedbooleanreturns true if any element is addedbooleanreturns true if any addedbooleanaddAll(Collection<? extends E> c) returns true if any element is addedintcapacity()booleanbooleancontainsAll(Collection<E> col) intgetCommonElementCount(Set<E> other) returns existing value or null if added can be used as an Object cacheiterator()booleanreturns true if removedbooleanreturns true if all were removedbooleanremoveAll(Collection<E> c) returns true if all were removedObject[]toArray()<T> T[]toArray(T[] a) toString()Returns a String like "[Drei, zwei, Eins]", exactly like java.util.HashSet.Methods 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
clear, isEmpty, size
-
Constructor Details
-
HashSet
public HashSet() -
HashSet
- Throws:
IllegalArgumentException
-
HashSet
- Throws:
IllegalArgumentException
-
HashSet
-
-
Method Details
-
contains
- Specified by:
containsin interfaceCollection<E>
-
containsAll
-
getOrAdd
returns existing value or null if added can be used as an Object cache -
get
-
add
returns true if element is added- Specified by:
addin interfaceCollection<E>- Parameters:
key- the element- Returns:
- true if added
-
addAll
returns true if any element is added- Specified by:
addAllin interfaceCollection<E>- Parameters:
c- the Collection to add- Returns:
- true if any element is added
-
addAll
returns true if any element is added- Parameters:
keys- the array of elements to add- Returns:
- true if any element is added
-
addAll
returns true if any added- Parameters:
keys- array of keys to addstart- first index to addlimit- limit of index to add- Returns:
- true if any element was added
-
remove
returns true if removed- Specified by:
removein interfaceCollection<E>- Parameters:
key- Object to remove- Returns:
- true if removed
-
removeAll
returns true if all were removed- Parameters:
c- Collection of elements to remove- Returns:
- true if all removed
-
removeAll
returns true if all were removed- Parameters:
keys- E[]- Returns:
- boolean
-
capacity
public int capacity() -
getCommonElementCount
-
toArray
public <T> T[] toArray(T[] a) -
toArray
-
iterator
- Specified by:
iteratorin interfaceCollection<E>
-
toString
Returns a String like "[Drei, zwei, Eins]", exactly like java.util.HashSet.
-