org.hsqldb.lib
Class HashSet
- java.lang.Object
-
- org.hsqldb.map.BaseHashMap
-
- org.hsqldb.lib.HashSet
-
- All Implemented Interfaces:
- Collection, Set
- Direct Known Subclasses:
- OrderedHashSet
public class HashSet extends BaseHashMap implements Set
This class does not store null keys.- Since:
- 1.7.2
-
-
Field Summary
-
Fields inherited from class org.hsqldb.map.BaseHashMap
ACCESS_MAX, emptyObjectArray
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description booleanadd(java.lang.Object key)returns true if addedbooleanaddAll(Collection c)returns true if any addedbooleanaddAll(java.lang.Object[] keys)returns true if any addedbooleanaddAll(java.lang.Object[] keys, int start, int limit)returns true if any addedbooleancontains(java.lang.Object key)booleancontainsAll(Collection col)java.lang.Objectget(java.lang.Object key)This method returns the Object that is already in the set and is equal to the argument o.Iteratoriterator()booleanremove(java.lang.Object key)returns true if removedbooleanremoveAll(Collection c)returns true if all were removedbooleanremoveAll(java.lang.Object[] keys)returns true if all were removedvoidsetComparator(ObjectComparator comparator)java.lang.Object[]toArray()voidtoArray(java.lang.Object[] a)java.lang.StringtoString()Returns a String like "[Drei, zwei, Eins]", exactly like java.util.HashSet.-
Methods inherited from class org.hsqldb.map.BaseHashMap
capacity, clear, getAccessCountCeiling, incrementAccessCount, isEmpty, setAccessCountFloor, size
-
-
-
-
Constructor Detail
-
HashSet
public HashSet()
-
HashSet
public HashSet(int initialCapacity) throws java.lang.IllegalArgumentException- Throws:
java.lang.IllegalArgumentException
-
-
Method Detail
-
setComparator
public void setComparator(ObjectComparator comparator)
-
contains
public boolean contains(java.lang.Object key)
- Specified by:
containsin interfaceCollection- Specified by:
containsin interfaceSet
-
containsAll
public boolean containsAll(Collection col)
-
get
public java.lang.Object get(java.lang.Object key)
Description copied from interface:SetThis method returns the Object that is already in the set and is equal to the argument o.
-
add
public boolean add(java.lang.Object key)
returns true if added- Specified by:
addin interfaceCollection- Specified by:
addin interfaceSet
-
addAll
public boolean addAll(Collection c)
returns true if any added- Specified by:
addAllin interfaceCollection
-
addAll
public boolean addAll(java.lang.Object[] keys)
returns true if any added
-
addAll
public boolean addAll(java.lang.Object[] keys, int start, int limit)returns true if any added
-
remove
public boolean remove(java.lang.Object key)
returns true if removed- Specified by:
removein interfaceCollection- Specified by:
removein interfaceSet
-
removeAll
public boolean removeAll(Collection c)
returns true if all were removed
-
removeAll
public boolean removeAll(java.lang.Object[] keys)
returns true if all were removed
-
toArray
public void toArray(java.lang.Object[] a)
-
toArray
public java.lang.Object[] toArray()
-
iterator
public Iterator iterator()
- Specified by:
iteratorin interfaceCollection- Specified by:
iteratorin interfaceSet
-
toString
public java.lang.String toString()
Returns a String like "[Drei, zwei, Eins]", exactly like java.util.HashSet.- Overrides:
toStringin classjava.lang.Object
-
-
DataMelt 3.0 © DataMelt by jWork.ORG