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
.Modifier and Type | Field and Description |
---|---|
static int |
HARD
Hard reference marker.
|
static int |
SOFT
Soft reference marker.
|
static int |
WEAK
Weak reference marker.
|
Constructor and Description |
---|
ConcurrentReferenceHashSet(int 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 static final int HARD
public static final int SOFT
public static final int WEAK
public ConcurrentReferenceHashSet(int 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–2018 Apache Software Foundation. All rights reserved.