Package com.pnfsoftware.jeb.util.collect
Class ConcurrentHashSet<E>
java.lang.Object
com.pnfsoftware.jeb.util.collect.ConcurrentHashSet<E>
- Type Parameters:
E-
- All Implemented Interfaces:
Iterable<E>,Collection<E>,Set<E>
- Direct Known Subclasses:
AddressHashSet
The
set version of a ConcurrentHashMap. Concurrency friendly.-
Constructor Summary
ConstructorsConstructorDescriptionConcurrentHashSet(int expectedMaxSize) ConcurrentHashSet(Collection<? extends E> c) -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanaddAll(Collection<? extends E> c) voidclear()booleanbooleancontainsAll(Collection<?> c) booleaninthashCode()booleanisEmpty()iterator()booleanbooleanremoveAll(Collection<?> c) booleanretainAll(Collection<?> c) intsize()Object[]toArray()<T> T[]toArray(T[] a) toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.Set
spliterator
-
Constructor Details
-
ConcurrentHashSet
public ConcurrentHashSet() -
ConcurrentHashSet
public ConcurrentHashSet(int expectedMaxSize) -
ConcurrentHashSet
-
-
Method Details
-
hashCode
public int hashCode() -
equals
-
clear
public void clear() -
size
public int size() -
isEmpty
public boolean isEmpty() -
contains
-
add
-
remove
-
addAll
-
removeAll
-
containsAll
- Specified by:
containsAllin interfaceCollection<E>- Specified by:
containsAllin interfaceSet<E>
-
retainAll
-
iterator
-
toArray
-
toArray
public <T> T[] toArray(T[] a) -
toString
-