public class SnapshotSet<T> extends Object implements Set<T>
Modifier and Type | Field and Description |
---|---|
protected Set<T> |
delegate |
protected boolean |
lockSnapshots |
protected boolean |
snapFirst |
Constructor and Description |
---|
SnapshotSet(boolean lockSnapshots) |
SnapshotSet(Set<T> set,
boolean shallow,
boolean lockSnapshots,
boolean snapFirst) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(T t) |
boolean |
addAll(Collection<? extends T> collection) |
void |
clear() |
boolean |
contains(Object o) |
boolean |
containsAll(Collection<?> collection) |
protected Set<T> |
copy() |
protected HashSet<T> |
copy(Set<T> set) |
boolean |
equals(Object o) |
void |
forEach(Consumer<? super T> action) |
int |
hashCode() |
boolean |
isEmpty() |
Iterator<T> |
iterator() |
void |
lockSnapshots() |
Stream<T> |
parallelStream() |
boolean |
remove(Object o) |
boolean |
removeAll(Collection<?> collection) |
boolean |
removeIf(Predicate<? super T> filter) |
boolean |
retainAll(Collection<?> collection) |
int |
size() |
Spliterator<T> |
spliterator() |
Stream<T> |
stream() |
Object[] |
toArray() |
<T1> T1[] |
toArray(T1[] t1s) |
protected volatile boolean lockSnapshots
protected volatile boolean snapFirst
public void lockSnapshots()
public boolean add(T t)
public boolean remove(Object o)
public boolean addAll(Collection<? extends T> collection)
public boolean retainAll(Collection<?> collection)
public boolean removeAll(Collection<?> collection)
public void clear()
public boolean removeIf(Predicate<? super T> filter)
removeIf
in interface Collection<T>
public int size()
public boolean isEmpty()
public boolean contains(Object o)
public Object[] toArray()
public <T1> T1[] toArray(T1[] t1s)
public boolean containsAll(Collection<?> collection)
containsAll
in interface Collection<T>
containsAll
in interface Set<T>
public boolean equals(Object o)
public int hashCode()
public Spliterator<T> spliterator()
spliterator
in interface Iterable<T>
spliterator
in interface Collection<T>
spliterator
in interface Set<T>
public Stream<T> stream()
stream
in interface Collection<T>
public Stream<T> parallelStream()
parallelStream
in interface Collection<T>
Copyright © 2020 JBoss by Red Hat. All rights reserved.