public class ConcurrentHashSet<E> extends AbstractSet<E>
| Constructor and Description |
|---|
ConcurrentHashSet()
constructor
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(E o)
add an obj to set, if exist, return false, else return true
|
void |
clear()
clear the set
|
boolean |
contains(Object o) |
Iterator<E> |
iterator() |
boolean |
remove(Object o) |
int |
size()
return the size of the map
|
equals, hashCode, removeAlladdAll, containsAll, isEmpty, retainAll, toArray, toArray, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitaddAll, containsAll, isEmpty, retainAll, spliterator, toArray, toArrayparallelStream, removeIf, streampublic int size()
size in interface Collection<E>size in interface Set<E>size in class AbstractCollection<E>AbstractCollection.size()public boolean contains(Object o)
contains in interface Collection<E>contains in interface Set<E>contains in class AbstractCollection<E>AbstractCollection.contains(Object)public Iterator<E> iterator()
iterator in interface Iterable<E>iterator in interface Collection<E>iterator in interface Set<E>iterator in class AbstractCollection<E>AbstractCollection.iterator()public boolean add(E o)
add in interface Collection<E>add in interface Set<E>add in class AbstractCollection<E>AbstractCollection.add(Object)public boolean remove(Object o)
remove in interface Collection<E>remove in interface Set<E>remove in class AbstractCollection<E>AbstractCollection.remove(Object)public void clear()
clear in interface Collection<E>clear in interface Set<E>clear in class AbstractCollection<E>AbstractCollection.clear()Copyright © 2024. All rights reserved.