public class CopyOnWriteHashSet<T>
extends com.google.common.collect.ForwardingSet<T>
Set implementation based on CopyOnWriteHashMap.
Null values are not supported.| Constructor and Description |
|---|
CopyOnWriteHashSet()
Create a new empty set.
|
| Modifier and Type | Method and Description |
|---|---|
CopyOnWriteHashSet<T> |
copyAndAdd(T entry)
Copy the current set and return a copy that contains or replaces
entry. |
CopyOnWriteHashSet<T> |
copyAndAddAll(Collection<? extends T> entries)
Copy the current set and return a copy that is the union of the current
set and
entries, potentially replacing existing entries in
case of equality. |
CopyOnWriteHashSet<T> |
copyAndRemove(Object entry)
Copy the current set and return a copy that removes
entry
if it exists. |
CopyOnWriteHashSet<T> |
copyAndRemoveAll(Collection<?> entries)
Copy the current set and return a copy that is the difference of the current
set and
entries. |
static <T> CopyOnWriteHashSet<T> |
copyOf(Collection<? extends T> set)
Return a copy of the provided set.
|
protected Set<T> |
delegate() |
equals, hashCode, standardEquals, standardHashCode, standardRemoveAlladd, addAll, clear, contains, containsAll, isEmpty, iterator, remove, removeAll, retainAll, size, standardAddAll, standardClear, standardContains, standardContainsAll, standardIsEmpty, standardRemove, standardRetainAll, standardToArray, standardToArray, standardToString, toArray, toArrayclone, finalize, getClass, notify, notifyAll, wait, wait, waitadd, addAll, clear, contains, containsAll, isEmpty, iterator, remove, removeAll, retainAll, size, spliterator, toArray, toArrayparallelStream, removeIf, streampublic static <T> CopyOnWriteHashSet<T> copyOf(Collection<? extends T> set)
protected Set<T> delegate()
delegate in class com.google.common.collect.ForwardingSet<T>public CopyOnWriteHashSet<T> copyAndAdd(T entry)
entry.public CopyOnWriteHashSet<T> copyAndAddAll(Collection<? extends T> entries)
entries, potentially replacing existing entries in
case of equality.public CopyOnWriteHashSet<T> copyAndRemove(Object entry)
entry
if it exists.public CopyOnWriteHashSet<T> copyAndRemoveAll(Collection<?> entries)
entries.Copyright © 2009–2016. All rights reserved.