Iterable<E>, Collection<E>, Set<E>public class ConcurrentHashSet<E> extends AbstractSet<E> implements Set<E>
| Constructor | Description |
|---|---|
ConcurrentHashSet() |
|
ConcurrentHashSet(int capacity) |
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
add(E o) |
|
boolean |
addAll(Collection<? extends E> c) |
|
void |
clear() |
|
boolean |
contains(Object o) |
|
boolean |
isEmpty() |
|
Iterator<E> |
iterator() |
|
boolean |
remove(Object o) |
|
int |
size() |
containsAll, retainAll, toArray, toArray, toStringequals, hashCode, removeAllparallelStream, removeIf, streamclone, finalize, getClass, notify, notifyAll, wait, wait, waitcontainsAll, equals, hashCode, removeAll, retainAll, spliterator, toArray, toArraypublic ConcurrentHashSet()
public ConcurrentHashSet(int capacity)
public boolean add(E o)
add in interface Collection<E>add in interface Set<E>add in class AbstractCollection<E>public void clear()
clear in interface Collection<E>clear in interface Set<E>clear in class AbstractCollection<E>public boolean contains(Object o)
contains in interface Collection<E>contains in interface Set<E>contains in class AbstractCollection<E>public boolean isEmpty()
isEmpty in interface Collection<E>isEmpty in interface Set<E>isEmpty in class AbstractCollection<E>public boolean remove(Object o)
remove in interface Collection<E>remove in interface Set<E>remove in class AbstractCollection<E>public int size()
size in interface Collection<E>size in interface Set<E>size in class AbstractCollection<E>public boolean addAll(Collection<? extends E> c)
addAll in interface Collection<E>addAll in interface Set<E>addAll in class AbstractCollection<E>