Class ConcurrentReferenceHashSet<E>
java.lang.Object
org.apache.openjpa.lib.util.concurrent.ConcurrentReferenceHashSet<E>
- All Implemented Interfaces:
Serializable,Iterable<E>,Collection<E>,Set<E>
A concurrent set whose values may be stored as weak or soft references. If
the constructor is invoked with
refType set to #HARD,
this uses a JDK1.5 ConcurrentHashMap under the covers. Otherwise,
it uses a ConcurrentReferenceHashMap.- Author:
- Abe White
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConstruct a set with the given reference type. -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanaddAll(Collection<? extends E> coll) voidclear()booleanbooleancontainsAll(Collection<?> coll) booleaninthashCode()booleanisEmpty()iterator()booleanbooleanremoveAll(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, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.Set
spliterator
-
Constructor Details
-
ConcurrentReferenceHashSet
Construct a set with the given reference type.
-
-
Method Details
-
add
-
addAll
-
clear
public void clear() -
contains
-
containsAll
- Specified by:
containsAllin interfaceCollection<E>- Specified by:
containsAllin interfaceSet<E>
-
isEmpty
public boolean isEmpty() -
iterator
-
remove
-
removeAll
-
retainAll
-
size
public int size() -
toArray
-
toArray
public <T> T[] toArray(T[] arr) -
hashCode
public int hashCode() -
equals
-