public class ConcurrentHashSet<E>
extends java.lang.Object
implements java.util.Set<E>
| Constructor and Description |
|---|
ConcurrentHashSet()
Constructs a new, empty set; the backing HashMap instance has
default initial capacity (16) and load factor (0.75).
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(E o)
Adds the specified element to this set if it is not already present.
|
boolean |
addAll(java.util.Collection<? extends E> c) |
void |
clear()
Removes all of the elements from this set.
|
boolean |
contains(java.lang.Object o)
Returns true if this set contains the specified element.
|
boolean |
containsAll(java.util.Collection<?> c) |
boolean |
isEmpty()
Returns true if this set contains no elements.
|
java.util.Iterator<E> |
iterator()
Returns an iterator over the elements in this set.
|
boolean |
remove(java.lang.Object o)
Removes the specified element from this set if it is present.
|
boolean |
removeAll(java.util.Collection<?> c) |
boolean |
retainAll(java.util.Collection<?> c) |
int |
size()
Returns the number of elements in this set (its cardinality).
|
java.lang.Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
public ConcurrentHashSet()
public java.util.Iterator<E> iterator()
public int size()
public boolean isEmpty()
public boolean contains(java.lang.Object o)
public boolean add(E o)
public boolean remove(java.lang.Object o)
public void clear()
public boolean addAll(java.util.Collection<? extends E> c)
public boolean containsAll(java.util.Collection<?> c)
public boolean removeAll(java.util.Collection<?> c)
public boolean retainAll(java.util.Collection<?> c)
public java.lang.Object[] toArray()
Copyright © 2015 Molindo GmbH. All Rights Reserved.