jade.util.leap
Class HashSet

java.lang.Object
  extended by jade.util.leap.HashSet
All Implemented Interfaces:
Collection, Set, java.io.Serializable, java.lang.Cloneable

public class HashSet
extends java.lang.Object
implements Set, java.lang.Cloneable, Serializable

See Also:
Serialized Form

Constructor Summary
HashSet()
           
HashSet(Collection c)
           
HashSet(int initialCapacity)
           
 
Method Summary
 boolean add(java.lang.Object o)
          Adds an element.
 boolean addAll(Collection c)
           
 void clear()
           
 java.lang.Object clone()
           
 boolean contains(java.lang.Object o)
           
 boolean containsAll(Collection c)
           
 boolean equals(java.lang.Object o)
           
 int hashCode()
           
 boolean isEmpty()
          Checks if the collection contains elements.
 Iterator iterator()
          Returns an iterator over the elements in this collection.
 boolean remove(java.lang.Object o)
          Removes one instance of the specified element.
 boolean removeAll(Collection c)
           
 int size()
          Returns the number of elements in this collection.
 java.lang.Object[] toArray()
          Returns an array containing all of the elements in this collection.
 java.lang.Object[] toArray(java.lang.Object[] a)
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HashSet

public HashSet()

HashSet

public HashSet(Collection c)

HashSet

public HashSet(int initialCapacity)
Method Detail

add

public boolean add(java.lang.Object o)
Description copied from interface: Collection
Adds an element.

Specified by:
add in interface Collection
Returns:
true if the element has been added.

isEmpty

public boolean isEmpty()
Description copied from interface: Collection
Checks if the collection contains elements.

Specified by:
isEmpty in interface Collection
Returns:
true if this collection contains no elements

iterator

public Iterator iterator()
Description copied from interface: Collection
Returns an iterator over the elements in this collection. There are no guarantees concerning the order in which the elements are returned.

Specified by:
iterator in interface Collection
Returns:
an Iterator over the elements in this collection

remove

public boolean remove(java.lang.Object o)
Description copied from interface: Collection
Removes one instance of the specified element.

Specified by:
remove in interface Collection
Parameters:
o - the element to be removed
Returns:
true if the element has been removed

size

public int size()
Description copied from interface: Collection
Returns the number of elements in this collection.

Specified by:
size in interface Collection
Returns:
the number of elements in this collection.

toArray

public java.lang.Object[] toArray()
Description copied from interface: Collection
Returns an array containing all of the elements in this collection.

Specified by:
toArray in interface Collection
Returns:
an array containing all of the elements in this collection

clear

public void clear()

contains

public boolean contains(java.lang.Object o)

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

addAll

public boolean addAll(Collection c)

containsAll

public boolean containsAll(Collection c)

removeAll

public boolean removeAll(Collection c)

toArray

public java.lang.Object[] toArray(java.lang.Object[] a)


These are the official JADE API. For these API backward compatibility is guaranteed accross JADE versions