public class NonBlockingHashSet<E>
extends java.util.AbstractSet<E>
implements java.io.Serializable
NonBlockingHashMap
making it implement the
Set
interface. All operations are Non-Blocking and multi-thread safe.Modifier and Type | Field and Description |
---|---|
private NonBlockingHashMap<E,java.lang.Object> |
_map |
private static java.lang.Object |
V |
Constructor and Description |
---|
NonBlockingHashSet()
Make a new empty
NonBlockingHashSet . |
Modifier and Type | Method and Description |
---|---|
boolean |
add(E o)
Add
o to the set. |
void |
clear()
Empty the set.
|
boolean |
contains(java.lang.Object o) |
E |
get(E o) |
java.util.Iterator<E> |
iterator() |
boolean |
remove(java.lang.Object o)
Remove
o from the set. |
int |
size()
Current count of elements in the set.
|
addAll, containsAll, isEmpty, retainAll, toArray, toArray, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
private static final java.lang.Object V
private final NonBlockingHashMap<E,java.lang.Object> _map
public NonBlockingHashSet()
NonBlockingHashSet
.public boolean add(E o)
o
to the set.public boolean contains(java.lang.Object o)
public boolean remove(java.lang.Object o)
o
from the set.public int size()
public void clear()