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 TypeMethodDescriptionboolean
returns true if element is addedboolean
returns true if any element is addedboolean
returns true if any addedboolean
addAll
(Collection<? extends E> c) returns true if any element is addedboolean
boolean
containsAll
(Collection<?> col) int
getCommonElementCount
(Set<E> other) iterator()
boolean
returns true if removedboolean
returns true if all were removedboolean
removeAll
(Collection<?> c) returns true if all were removedboolean
retainAll
(Collection<?> c) Object[]
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, size
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods 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:
contains
in interfaceCollection<E>
-
containsAll
-
getOrAdd
-
get
-
add
returns true if element is added- Specified by:
add
in interfaceCollection<E>
- Parameters:
key
- the element- Returns:
- true if added
-
addAll
returns true if any element is added- Specified by:
addAll
in 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:
remove
in 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
-
retainAll
-
removeAll
returns true if all were removed- Parameters:
keys
- E[]- Returns:
- boolean
-
getCommonElementCount
-
toArray
public <T> T[] toArray(T[] a) -
toArray
-
iterator
- Specified by:
iterator
in interfaceCollection<E>
-
toString
Returns a String like "[Drei, zwei, Eins]", exactly like java.util.HashSet.
-