JML

java.util
Class HashSet

java.lang.Object
  extended byjava.util.AbstractCollection
      extended byjava.util.AbstractSet
          extended byjava.util.HashSet
All Implemented Interfaces:
Cloneable, Collection, Serializable, Set
Direct Known Subclasses:
JTypeDeclaration.PleomorphSet, LinkedHashSet

public class HashSet
extends AbstractSet
implements Set, Cloneable, Serializable


Field Summary
private  HashMap map
           
private static Object PRESENT
           
(package private) static long serialVersionUID
           
 
Constructor Summary
  HashSet()
           
  HashSet(int)
           
  HashSet(int, float)
           
(package private) HashSet(int, float, boolean)
           
  HashSet(Collection)
           
 
Method Summary
 boolean add(Object)
           
 void clear()
           
 Object clone()
           
 boolean contains(Object)
           
 boolean isEmpty()
           
 Iterator iterator()
           
private  void readObject(ObjectInputStream)
           
 boolean remove(Object)
           
 int size()
           
private  void writeObject(ObjectOutputStream)
           
 
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
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Set
addAll, containsAll, equals, hashCode, removeAll, retainAll, toArray, toArray
 

Field Detail

PRESENT

private static final Object PRESENT

map

private transient HashMap map

serialVersionUID

static final long serialVersionUID
Constructor Detail

HashSet

public HashSet()

HashSet

public HashSet(Collection)

HashSet

public HashSet(int,
               float)

HashSet

public HashSet(int)

HashSet

HashSet(int,
        float,
        boolean)
Method Detail

iterator

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

size

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

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()
Overrides:
clone in class Object

writeObject

private void writeObject(ObjectOutputStream)
                  throws IOException
Throws:
IOException

readObject

private void readObject(ObjectInputStream)
                 throws IOException,
                        ClassNotFoundException
Throws:
IOException
ClassNotFoundException

JML

JML is Copyright (C) 1998-2002 by Iowa State University and is distributed under the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This release depends on code from the MultiJava project and is based in part on the Kopi project Copyright (C) 1990-99 DMS Decision Management Systems Ges.m.b.H.