| 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
  |
  +--weiss.util.AbstractCollection
        |
        +--weiss.util.HashSet
HashSet implementation. Matches are based on equals; and hashCode must be consistently defined.
| Constructor Summary | |
HashSet()
Construct an empty HashSet.  | 
|
HashSet(Collection other)
Construct a HashSet from any collection.  | 
|
| Method Summary | |
 boolean | 
add(java.lang.Object x)
Adds an item to this collection.  | 
 void | 
clear()
Change the size of this collection to zero.  | 
 boolean | 
contains(java.lang.Object x)
Tests if some item is in this collection.  | 
 java.lang.Object | 
getMatch(java.lang.Object x)
This method is not part of standard Java 1.2.  | 
 Iterator | 
iterator()
Obtains an Iterator object used to traverse the collection.  | 
 boolean | 
remove(java.lang.Object x)
Removes an item from this collection.  | 
 int | 
size()
Returns the number of items in this collection.  | 
| Methods inherited from class weiss.util.AbstractCollection | 
equals, hashCode, isEmpty, toArray | 
| Methods inherited from class java.lang.Object | 
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait | 
| Methods inherited from interface weiss.util.Collection | 
isEmpty, toArray | 
| Constructor Detail | 
public HashSet()
public HashSet(Collection other)
| Method Detail | 
public int size()
size in interface Collectionpublic java.lang.Object getMatch(java.lang.Object x)
getMatch in interface Setx - the object to search for.public boolean contains(java.lang.Object x)
contains in interface Collectioncontains in class AbstractCollectionx - any object.public boolean add(java.lang.Object x)
add in interface Collectionx - any object.public boolean remove(java.lang.Object x)
remove in interface Collectionremove in class AbstractCollectionx - any object.public void clear()
clear in interface Collectionclear in class AbstractCollectionpublic Iterator iterator()
iterator in interface Collection
  | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||