NonBlockingHashMap making it implement the
Set interface. All operations are Non-Blocking and multi-thread safe.
| Modifier and Type | Field and Description |
|---|---|
| private final NonBlockingHashMap | |
| private static final Object |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: true ifo was added to the set, false
if o was already in the set.element to be added to this set o)Overrides java. Implements java. o to the set.
|
| public void | clear()
Overrides java. Implements java. |
| public boolean | Returns: true ifo is in the set.element whose presence in this set is to be tested o)Overrides java. Implements java. true if this set contains the specified element.
|
| public E | |
| public Iterator | iterator()
Implements abstract java. Implements java. |
| public boolean | Returns: true ifo was removed to the set, false
if o was not in the set.object to be removed from this set, if present o)Overrides java. Implements java. o from the set.
|
| public int | Returns: count of elements.Implements abstract java. Implements java. |
| _map | back to summary |
|---|---|
| private final NonBlockingHashMap<E, Object> _map | |
| V | back to summary |
|---|---|
| private static final Object V | |
| NonBlockingHashSet | back to summary |
|---|---|
| public NonBlockingHashSet() Make a new empty | |
| add | back to summary |
|---|---|
| public boolean add(final E o) Overrides java. Implements java. Add
| |
| clear | back to summary |
|---|---|
| public void clear() Overrides java. Implements java. Empty the set. | |
| contains | back to summary |
|---|---|
| public boolean contains(final Object o) Overrides java. Implements java. Doc from java. Returns
| |
| get | back to summary |
|---|---|
public E get(final E o)
| |
| iterator | back to summary |
|---|---|
| public Iterator Implements abstract java. Implements java. Doc from java. Returns an iterator over the elements in this set. The elements are returned in no particular order (unless this set is an instance of some class that provides a guarantee).
| |
| remove | back to summary |
|---|---|
| public boolean remove(final Object o) Overrides java. Implements java. Remove
| |
| size | back to summary |
|---|---|
| public int size() Implements abstract java. Implements java. Current count of elements in the set. Due to concurrent racing updates, the size is only ever approximate. Updates due to the calling thread are immediately visible to calling thread.
| |