Package com.couchbase.client.core.util
Class AtomicEnumSet<E extends Enum<E>>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractSet<E>
com.couchbase.client.core.util.AtomicEnumSet<E>
- All Implemented Interfaces:
Iterable<E>,Collection<E>,Set<E>
A thread-safe cousin of
EnumSet that performs well in use cases
dominated by reads.
In high-concurrency, mutation-heavy use cases, a standard EnumSet
wrapped by Collections.synchronizedSet(Set) might perform better.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanaddAll(Collection<? extends E> c) static <E extends Enum<E>>
AtomicEnumSet<E> voidclear()booleanbooleancontainsAll(Collection<?> c) booleanisEmpty()iterator()static <E extends Enum<E>>
AtomicEnumSet<E> booleanbooleanremoveAll(Collection<?> c) booleanretainAll(Collection<?> c) intsize()Methods inherited from class java.util.AbstractSet
equals, hashCodeMethods inherited from class java.util.AbstractCollection
toArray, toArray, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, streamMethods inherited from interface java.util.Set
spliterator, toArray, toArray
-
Method Details
-
noneOf
-
allOf
-
contains
-
containsAll
- Specified by:
containsAllin interfaceCollection<E extends Enum<E>>- Specified by:
containsAllin interfaceSet<E extends Enum<E>>- Overrides:
containsAllin classAbstractCollection<E extends Enum<E>>
-
add
-
addAll
-
remove
-
removeAll
-
retainAll
-
iterator
-
size
public int size() -
isEmpty
public boolean isEmpty() -
clear
public void clear()
-