Class HashSet<E>
java.lang.Object
org.hsqldb.lib.HashSet<E>
- All Implemented Interfaces:
Collection<E>, Set<E>
- Direct Known Subclasses:
OrderedHashSet
-
Field Summary
Fields -
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()voidclear()Clear the map completely.org.hsqldb.map.BaseHashMapclone()booleanbooleancontainsAll(Collection<E> col) intgetCommonElementCount(Set<E> other) returns existing value or null if added can be used as an Object cachebooleanisEmpty()iterator()booleanreturns true if removedbooleanreturns true if all were removedbooleanremoveAll(Collection<E> c) returns true if all were removedintsize()Object[]toArray()<T> T[]toArray(T[] a) toString()Returns a String like "[Drei, zwei, Eins]", exactly like java.util.HashSet.Methods inherited from interface Collection
clear, isEmpty, size
-
Field Details
-
ACCESS_MAX
public static final int ACCESS_MAX- See Also:
-
emptyObjectArray
-
-
Constructor Details
-
HashSet
public HashSet() -
HashSet
- Throws:
IllegalArgumentException
-
HashSet
- Throws:
IllegalArgumentException
-
HashSet
-
-
Method Details
-
contains
- Specified by:
containsin interfaceCollection<E>
-
containsAll
-
getOrAdd
-
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
-
clear
public void clear()Clear the map completely. -
size
public int size() -
isEmpty
public boolean isEmpty() -
clone
public org.hsqldb.map.BaseHashMap clone()
-