scale.common
Class HashSet<T>

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractSet<E>
          extended by java.util.HashSet<T>
              extended by scale.common.HashSet<T>
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<T>, java.util.Collection<T>, java.util.Set<T>

public class HashSet<T>
extends java.util.HashSet<T>
implements java.lang.Cloneable

A Scale cover class for a java.util.HashSet.

$Id: HashSet.java,v 1.25 2007-10-04 19:58:10 burrill Exp $

Copyright 2008 by the Scale Compiler Group,
Department of Computer Science
University of Massachusetts,
Amherst MA. 01003, USA
All Rights Reserved.

See Also:
Serialized Form

Constructor Summary
HashSet()
           
HashSet(HashSet<T> set)
           
HashSet(java.util.HashSet<T> set)
           
HashSet(int capacity)
           
HashSet(int capacity, float loadRatio)
           
HashSet(java.util.List<T> list)
           
HashSet(java.util.Set<T> set)
           
 
Method Summary
 void add(java.util.Enumeration<T> e)
          Add the elements of an enumeration to this HashSet.
 void add(HashSet<T> hs)
          Add the elements of another HashSet to this HashSet.
 void add(java.util.Iterator<T> e)
          Add the elements of an iteration to this HashSet.
 HashSet<T> clone()
           
 T remove()
          Remove an object at random from the HashSet
 java.lang.String toString()
           
 HashSet<T> union(HashSet<T> u)
           
 
Methods inherited from class java.util.HashSet
add, clear, contains, isEmpty, iterator, remove, size
 
Methods inherited from class java.util.AbstractSet
equals, hashCode, removeAll
 
Methods inherited from class java.util.AbstractCollection
addAll, containsAll, retainAll, toArray, toArray
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, 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(int capacity)

HashSet

public HashSet(int capacity,
               float loadRatio)

HashSet

public HashSet(HashSet<T> set)

HashSet

public HashSet(java.util.HashSet<T> set)

HashSet

public HashSet(java.util.Set<T> set)

HashSet

public HashSet(java.util.List<T> list)
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.util.AbstractCollection<T>

remove

public T remove()
Remove an object at random from the HashSet


union

public HashSet<T> union(HashSet<T> u)

add

public void add(java.util.Iterator<T> e)
Add the elements of an iteration to this HashSet.

Parameters:
e - is the iterator from which the new elements are obtained

add

public void add(java.util.Enumeration<T> e)
Add the elements of an enumeration to this HashSet.

Parameters:
e - is the enumeration from which the new elements are obtained

add

public void add(HashSet<T> hs)
Add the elements of another HashSet to this HashSet.

Parameters:
hs - the HashSet from which the new elements are obtained

clone

public final HashSet<T> clone()
Overrides:
clone in class java.util.HashSet<T>