java.util
Class HashSet<E>

java.lang.Object
  extended by java.util.HashSet<E>
All Implemented Interfaces:
Iterable<E>, Collection<E>, Set<E>

Deprecated. Current implementation is inefficient. Don't use it if your care about performance. Will be replaced with efficient implementation.

@Deprecated
public class HashSet<E>
extends Object
implements Set<E>

Author:
Michael Mirwaldt

Constructor Summary
HashSet()
          Deprecated.  
HashSet(Collection<? extends E> rhs)
          Deprecated.  
 
Method Summary
 boolean add(E e)
          Deprecated. Adds the specified element to this set if it is not already present
 boolean addAll(Collection<? extends E> c)
           
 void clear()
          Deprecated. Removes all of the elements from this set
 boolean contains(Object o)
          Deprecated. Returns true if this set contains the specified element.
 boolean containsAll(Collection<?> c)
           
 boolean equals(Object o)
          Deprecated. Compares the specified object with this set for equality.
 int hashCode()
          Deprecated. Returns the hash code value for this set.
 boolean isEmpty()
           
 Iterator<E> iterator()
          Deprecated. Returns an iterator over the elements in this set.
 boolean remove(Object o)
          Deprecated. Removes the specified element from this set if it is present.
 boolean removeAll(Collection<?> c)
           
 boolean retainAll(Collection<?> c)
           
 int size()
          Deprecated. Retains only the elements in this set that are contained in the specified collection.
 Object[] toArray()
           
<T> T[]
toArray(T[] dest)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Set
addAll, containsAll, isEmpty, removeAll, retainAll, toArray, toArray
 

Constructor Detail

HashSet

public HashSet()
Deprecated. 

HashSet

public HashSet(Collection<? extends E> rhs)
Deprecated. 
Method Detail

add

public boolean add(E e)
Deprecated. 
Description copied from interface: Set
Adds the specified element to this set if it is not already present

Specified by:
add in interface Collection<E>
Specified by:
add in interface Set<E>

clear

public void clear()
Deprecated. 
Description copied from interface: Set
Removes all of the elements from this set

Specified by:
clear in interface Collection<E>
Specified by:
clear in interface Set<E>

contains

public boolean contains(Object o)
Deprecated. 
Description copied from interface: Set
Returns true if this set contains the specified element.

Specified by:
contains in interface Collection<E>
Specified by:
contains in interface Set<E>

iterator

public Iterator<E> iterator()
Deprecated. 
Description copied from interface: Set
Returns an iterator over the elements in this set.

Specified by:
iterator in interface Iterable<E>
Specified by:
iterator in interface Collection<E>
Specified by:
iterator in interface Set<E>

remove

public boolean remove(Object o)
Deprecated. 
Description copied from interface: Set
Removes the specified element from this set if it is present.

Specified by:
remove in interface Collection<E>
Specified by:
remove in interface Set<E>

size

public int size()
Deprecated. 
Description copied from interface: Set
Retains only the elements in this set that are contained in the specified collection.

Specified by:
size in interface Collection<E>
Specified by:
size in interface Set<E>

hashCode

public int hashCode()
Deprecated. 
Description copied from interface: Set
Returns the hash code value for this set.

Specified by:
hashCode in interface Collection<E>
Specified by:
hashCode in interface Set<E>
Overrides:
hashCode in class Object

equals

public boolean equals(Object o)
Deprecated. 
Description copied from interface: Set
Compares the specified object with this set for equality.

Specified by:
equals in interface Collection<E>
Specified by:
equals in interface Set<E>
Overrides:
equals in class Object

addAll

public boolean addAll(Collection<? extends E> c)
Specified by:
addAll in interface Collection<E>

containsAll

public boolean containsAll(Collection<?> c)
Specified by:
containsAll in interface Collection<E>

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Collection<E>

removeAll

public boolean removeAll(Collection<?> c)
Specified by:
removeAll in interface Collection<E>

retainAll

public boolean retainAll(Collection<?> c)
Specified by:
retainAll in interface Collection<E>

toArray

public Object[] toArray()
Specified by:
toArray in interface Collection<E>

toArray

public <T> T[] toArray(T[] dest)
Specified by:
toArray in interface Collection<E>

toString

public String toString()
Overrides:
toString in class Object