public class ConcurrentReferenceHashSet<E> extends Object implements Set<E>, Serializable
refType
set to #HARD
,
this uses a JDK1.5 ConcurrentHashMap
under the covers. Otherwise,
it uses a ConcurrentReferenceHashMap
.Constructor and Description |
---|
ConcurrentReferenceHashSet(org.apache.commons.collections4.map.AbstractReferenceMap.ReferenceStrength refType)
Construct a set with the given reference type.
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(E obj) |
boolean |
addAll(Collection<? extends E> coll) |
void |
clear() |
boolean |
contains(Object obj) |
boolean |
containsAll(Collection<?> coll) |
boolean |
equals(Object obj) |
int |
hashCode() |
boolean |
isEmpty() |
Iterator<E> |
iterator() |
boolean |
remove(Object obj) |
boolean |
removeAll(Collection<?> coll) |
boolean |
retainAll(Collection<?> coll) |
int |
size() |
Object[] |
toArray() |
<T> T[] |
toArray(T[] arr) |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
spliterator
parallelStream, removeIf, stream
public ConcurrentReferenceHashSet(org.apache.commons.collections4.map.AbstractReferenceMap.ReferenceStrength refType)
public boolean add(E obj)
public boolean addAll(Collection<? extends E> coll)
public void clear()
public boolean contains(Object obj)
public boolean containsAll(Collection<?> coll)
containsAll
in interface Collection<E>
containsAll
in interface Set<E>
public boolean isEmpty()
public boolean remove(Object obj)
public boolean removeAll(Collection<?> coll)
public boolean retainAll(Collection<?> coll)
public int size()
public Object[] toArray()
public <T> T[] toArray(T[] arr)
public int hashCode()
Copyright © 2006–2020 Apache Software Foundation. All rights reserved.