Class ConcurrentReferenceHashSet<E>
- java.lang.Object
 - 
- org.apache.openjpa.lib.util.concurrent.ConcurrentReferenceHashSet<E>
 
 
- 
- All Implemented Interfaces:
 Serializable,Iterable<E>,Collection<E>,Set<E>
public class ConcurrentReferenceHashSet<E> extends Object implements Set<E>, Serializable
A concurrent set whose values may be stored as weak or soft references. If the constructor is invoked withrefTypeset to#HARD, this uses a JDK1.5ConcurrentHashMapunder the covers. Otherwise, it uses aConcurrentReferenceHashMap.- Author:
 - Abe White
 - See Also:
 - Serialized Form
 
 
- 
- 
Constructor Summary
Constructors Constructor Description ConcurrentReferenceHashSet(AbstractReferenceMap.ReferenceStrength refType)Construct a set with the given reference type. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(E obj)booleanaddAll(Collection<? extends E> coll)voidclear()booleancontains(Object obj)booleancontainsAll(Collection<?> coll)booleanequals(Object obj)inthashCode()booleanisEmpty()Iterator<E>iterator()booleanremove(Object obj)booleanremoveAll(Collection<?> coll)booleanretainAll(Collection<?> coll)intsize()Object[]toArray()<T> T[]toArray(T[] arr)- 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait 
- 
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray 
- 
Methods inherited from interface java.util.Set
spliterator 
 - 
 
 - 
 
- 
- 
Constructor Detail
- 
ConcurrentReferenceHashSet
public ConcurrentReferenceHashSet(AbstractReferenceMap.ReferenceStrength refType)
Construct a set with the given reference type. 
 - 
 
- 
Method Detail
- 
add
public boolean add(E obj)
 
- 
addAll
public boolean addAll(Collection<? extends E> coll)
 
- 
clear
public void clear()
 
- 
contains
public boolean contains(Object obj)
 
- 
containsAll
public boolean containsAll(Collection<?> coll)
- Specified by:
 containsAllin interfaceCollection<E>- Specified by:
 containsAllin interfaceSet<E>
 
- 
isEmpty
public boolean isEmpty()
 
- 
remove
public boolean remove(Object obj)
 
- 
removeAll
public boolean removeAll(Collection<?> coll)
 
- 
retainAll
public boolean retainAll(Collection<?> coll)
 
- 
size
public int size()
 
- 
toArray
public Object[] toArray()
 
- 
toArray
public <T> T[] toArray(T[] arr)
 
- 
hashCode
public int hashCode()
 
 - 
 
 -