java.util
Class HashSet

java.lang.Object
  |
  +--java.util.AbstractCollection
        |
        +--java.util.AbstractSet
              |
              +--java.util.HashSet
All Implemented Interfaces:
Cloneable, Collection, Serializable, Set
Direct Known Subclasses:
LinkedHashSet

public synchronized class HashSet
extends AbstractSet
implements Set, Cloneable, Serializable

See Also:
Serialized Form

Constructor Summary
HashSet()
           
HashSet(Collection)
           
HashSet(int)
           
HashSet(int, float)
           
 
Method Summary
 boolean add(Object)
           
 void clear()
           
 Object clone()
           
 boolean contains(Object)
           
 boolean isEmpty()
           
 Iterator iterator()
           
 boolean remove(Object)
           
 int size()
           
 
Methods inherited from class java.util.AbstractSet
equals, hashCode, removeAll
 
Methods inherited from class java.util.AbstractCollection
addAll, containsAll, retainAll, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait
 
Methods inherited from interface java.util.Set
addAll, containsAll, equals, hashCode, removeAll, retainAll, toArray, toArray
 

Constructor Detail

HashSet

public HashSet()

HashSet

public HashSet(Collection)

HashSet

public HashSet(int,
               float)

HashSet

public HashSet(int)
Method Detail

iterator

public Iterator iterator()
Specified by:
iterator in interface Set
Specified by:
iterator in class AbstractCollection

size

public int size()
Specified by:
size in interface Set
Specified by:
size in class AbstractCollection

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Set
Overrides:
isEmpty in class AbstractCollection

contains

public boolean contains(Object)
Specified by:
contains in interface Set
Overrides:
contains in class AbstractCollection

add

public boolean add(Object)
Specified by:
add in interface Set
Overrides:
add in class AbstractCollection

remove

public boolean remove(Object)
Specified by:
remove in interface Set
Overrides:
remove in class AbstractCollection

clear

public void clear()
Specified by:
clear in interface Set
Overrides:
clear in class AbstractCollection

clone

public Object clone()