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
ConstructorDescriptionConstruct a set with the given reference type. -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
addAll
(Collection<? extends E> coll) void
clear()
boolean
boolean
containsAll
(Collection<?> coll) boolean
int
hashCode()
boolean
isEmpty()
iterator()
boolean
boolean
removeAll
(Collection<?> coll) boolean
retainAll
(Collection<?> coll) int
size()
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 Details
-
ConcurrentReferenceHashSet
Construct a set with the given reference type.
-
-
Method Details
-
add
-
addAll
-
clear
public void clear() -
contains
-
containsAll
- Specified by:
containsAll
in interfaceCollection<E>
- Specified by:
containsAll
in 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
-