API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.util.concurrent. CopyOnWriteArraySet View Source
Author(s)
Doug Lea
Since
1.5
Version
Serial
Hierarchy
 Object
      AbstractCollection
          AbstractSet
              CopyOnWriteArraySet
Implements
 Serializable
Subclasses
Description
public class CopyOnWriteArraySet
  A Set that uses an internal CopyOnWriteArrayList for all of its operations.
See also:    CopyOnWriteArrayList
Constructors
public CopyOnWriteArraySet ()
Creates an empty set.
public CopyOnWriteArraySet (Collection<Object> c)
  Creates a set containing all of the elements of the specified collection.
Methods
Hide/Show inherited methods
public boolean add ( E e) [Overrides AbstractCollection]
  Adds the specified element to this set if it is not already present.
public boolean addAll (Collection<Object> c) [Overrides AbstractCollection]
  Adds all of the elements in the specified collection to this set if they're not already present.
public void clear () [Overrides AbstractCollection]
  Removes all of the elements from this set.
public boolean contains (Object o) [Overrides AbstractCollection]
  Returns true if this set contains the specified element.
public boolean containsAll (Collection<Object> c) [Overrides AbstractCollection]
  Returns true if this set contains all of the elements of the specified collection.
public boolean equals (Object o) [Overrides AbstractSet]
  Compares the specified object with this set for equality.
public int hashCode () [Inherited From AbstractSet]
  Returns the hash code value for this set.
public boolean isEmpty () [Overrides AbstractCollection]
  Returns true if this set contains no elements.
public Iterator< E> iterator () [Specified in AbstractCollection]
  Returns an iterator over the elements contained in this set in the order in which these elements were added.
public boolean remove (Object o) [Overrides AbstractCollection]
  Removes the specified element from this set if it is present.
public boolean removeAll (Collection<Object> c) [Overrides AbstractSet]
  Removes from this set all of its elements that are contained in the specified collection.
public boolean retainAll (Collection<Object> c) [Overrides AbstractCollection]
  Retains only the elements in this set that are contained in the specified collection.
public int size () [Specified in AbstractCollection]
  Returns the number of elements in this set.
public Object toArray () [Overrides AbstractCollection]
  Returns an array containing all of the elements in this set.
public T toArray ( T a) [Overrides AbstractCollection]
  Returns an array containing all of the elements in this set; the runtime type of the returned array is that of the specified array.
public String toString () [Inherited From AbstractCollection]
  Returns a string representation of this collection.
Fields
Hide/Show inherited fields
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar