API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.util. Set View Source
Author(s)
Josh Bloch
Neal Gafter
Since
1.2
Version
1.39, 04/21/06
Serial
Hierarchy
 Iterable
      Collection
          Set
Subinterfaces
Description
public interface Set
  A collection that contains no duplicate elements.
Methods
Hide/Show inherited methods
public boolean add ( E e) [Specified in Collection]
  Adds the specified element to this set if it is not already present (optional operation).
public boolean addAll (Collection<Object> c) [Specified in Collection]
  Adds all of the elements in the specified collection to this set if they're not already present (optional operation).
public void clear () [Specified in Collection]
  Removes all of the elements from this set (optional operation).
public boolean contains (Object o) [Specified in Collection]
  Returns true if this set contains the specified element.
public boolean containsAll (Collection<Object> c) [Specified in Collection]
  Returns true if this set contains all of the elements of the specified collection.
public boolean equals (Object o) [Specified in Collection]
  Compares the specified object with this set for equality.
public int hashCode () [Specified in Collection]
  Returns the hash code value for this set.
public boolean isEmpty () [Specified in Collection]
  Returns true if this set contains no elements.
public Iterator< E> iterator () [Specified in Collection]
  Returns an iterator over the elements in this set.
public boolean remove (Object o) [Specified in Collection]
  Removes the specified element from this set if it is present (optional operation).
public boolean removeAll (Collection<Object> c) [Specified in Collection]
  Removes from this set all of its elements that are contained in the specified collection (optional operation).
public boolean retainAll (Collection<Object> c) [Specified in Collection]
  Retains only the elements in this set that are contained in the specified collection (optional operation).
public int size () [Specified in Collection]
  Returns the number of elements in this set (its cardinality).
public Object toArray () [Specified in Collection]
  Returns an array containing all of the elements in this set.
public T toArray ( T a) [Specified in Collection]
  Returns an array containing all of the elements in this set; the runtime type of the returned array is that of the specified array.
Fields
Hide/Show inherited fields
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar