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 TypeMethodDescriptionboolean
boolean
addAll
(Collection<? extends E> c) static <E extends Enum<E>>
AtomicEnumSet<E> void
clear()
boolean
boolean
boolean
containsAll
(Collection<?> c) boolean
isEmpty()
iterator()
static <E extends Enum<E>>
AtomicEnumSet<E> boolean
boolean
removeAll
(Collection<?> c) boolean
retainAll
(Collection<?> c) int
size()
Methods inherited from class java.util.AbstractSet
equals, hashCode
Methods inherited from class java.util.AbstractCollection
toArray, toArray, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream
Methods inherited from interface java.util.Set
spliterator, toArray, toArray
-
Method Details
-
noneOf
-
allOf
-
contains
-
containsAll
- Specified by:
containsAll
in interfaceCollection<E extends Enum<E>>
- Specified by:
containsAll
in interfaceSet<E extends Enum<E>>
- Overrides:
containsAll
in classAbstractCollection<E extends Enum<E>>
-
contains
-
add
-
addAll
-
remove
-
removeAll
-
retainAll
-
iterator
-
size
public int size() -
isEmpty
public boolean isEmpty() -
clear
public void clear()
-