org.apache.openjpa.lib.util.concurrent
Class ConcurrentHashSet

java.lang.Object
  extended by org.apache.openjpa.lib.util.concurrent.ConcurrentHashSet
All Implemented Interfaces:
Serializable, Iterable, Collection, Set

public class ConcurrentHashSet
extends Object
implements Set, Serializable

A concurrent set.

Author:
Abe White
See Also:
Serialized Form

Constructor Summary
ConcurrentHashSet()
          Construct a set with the given reference type.
 
Method Summary
 boolean add(Object obj)
           
 boolean addAll(Collection coll)
           
 void clear()
           
 boolean contains(Object obj)
           
 boolean containsAll(Collection coll)
           
 boolean equals(Object obj)
           
 int hashCode()
           
 boolean isEmpty()
           
 Iterator iterator()
           
 boolean remove(Object obj)
           
 boolean removeAll(Collection coll)
           
 boolean retainAll(Collection coll)
           
 int size()
           
 Object[] toArray()
           
 Object[] toArray(Object[] arr)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConcurrentHashSet

public ConcurrentHashSet()
Construct a set with the given reference type.

Method Detail

add

public boolean add(Object obj)
Specified by:
add in interface Collection
Specified by:
add in interface Set

addAll

public boolean addAll(Collection coll)
Specified by:
addAll in interface Collection
Specified by:
addAll in interface Set

clear

public void clear()
Specified by:
clear in interface Collection
Specified by:
clear in interface Set

contains

public boolean contains(Object obj)
Specified by:
contains in interface Collection
Specified by:
contains in interface Set

containsAll

public boolean containsAll(Collection coll)
Specified by:
containsAll in interface Collection
Specified by:
containsAll in interface Set

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Collection
Specified by:
isEmpty in interface Set

iterator

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

remove

public boolean remove(Object obj)
Specified by:
remove in interface Collection
Specified by:
remove in interface Set

removeAll

public boolean removeAll(Collection coll)
Specified by:
removeAll in interface Collection
Specified by:
removeAll in interface Set

retainAll

public boolean retainAll(Collection coll)
Specified by:
retainAll in interface Collection
Specified by:
retainAll in interface Set

size

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

toArray

public Object[] toArray()
Specified by:
toArray in interface Collection
Specified by:
toArray in interface Set

toArray

public Object[] toArray(Object[] arr)
Specified by:
toArray in interface Collection
Specified by:
toArray in interface Set

hashCode

public int hashCode()
Specified by:
hashCode in interface Collection
Specified by:
hashCode in interface Set
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Specified by:
equals in interface Collection
Specified by:
equals in interface Set
Overrides:
equals in class Object


Copyright © 2006-2008 Apache Software Foundation. All Rights Reserved.