java.io.Serializablepublic 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.| Constructor | Description |
|---|---|
NonBlockingHashSet() |
Make a new empty
NonBlockingHashSet. |
| Modifier and Type | Method | 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, toStringpublic NonBlockingHashSet()
NonBlockingHashSet.public boolean add(E o)
o to the set.add in class java.util.AbstractCollection<E>o was added to the set, false
if o was already in the set.public boolean contains(java.lang.Object o)
contains in class java.util.AbstractCollection<E>o is in the set.public boolean remove(java.lang.Object o)
o from the set.remove in class java.util.AbstractCollection<E>o was removed to the set, false
if o was not in the set.public int size()
size in class java.util.AbstractCollection<E>public void clear()
clear in class java.util.AbstractCollection<E>Copyright © 2013–2017. All rights reserved.