public class NonBlockingHashSet<E> extends AbstractSet<E> implements Serializable
NonBlockingHashMap
making it implement the
Set
interface. All operations are Non-Blocking and multi-thread safe.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(Object o) |
E |
get(E o) |
Iterator<E> |
iterator() |
boolean |
remove(Object o)
Remove
o from the set. |
int |
size()
Current count of elements in the set.
|
equals, hashCode, removeAll
addAll, containsAll, isEmpty, retainAll, toArray, toArray, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
addAll, containsAll, isEmpty, retainAll, spliterator, toArray, toArray
parallelStream, removeIf, stream
public NonBlockingHashSet()
NonBlockingHashSet
.public boolean add(E o)
o
to the set.add
in interface Collection<E>
add
in interface Set<E>
add
in class AbstractCollection<E>
o
was added to the set, false
if o
was already in the set.public boolean contains(Object o)
contains
in interface Collection<E>
contains
in interface Set<E>
contains
in class AbstractCollection<E>
o
is in the set.public boolean remove(Object o)
o
from the set.remove
in interface Collection<E>
remove
in interface Set<E>
remove
in class AbstractCollection<E>
o
was removed to the set, false
if o
was not in the set.public int size()
size
in interface Collection<E>
size
in interface Set<E>
size
in class AbstractCollection<E>
public void clear()
clear
in interface Collection<E>
clear
in interface Set<E>
clear
in class AbstractCollection<E>
Copyright © 2013–2018. All rights reserved.