public class BufferedHashSet<E>
extends java.lang.Object
implements java.util.Set<E>
Constructor and Description |
---|
BufferedHashSet() |
Modifier and Type | Method and Description |
---|---|
boolean |
add(E e)
Updates the write buffer to reflect the addition of the specified element.
|
boolean |
addAll(java.util.Collection<? extends E> c)
Updates the write buffer to reflect the removal of the specified elements.
|
void |
clear()
Clears the write buffer.
|
void |
commit()
Called from the writing thread to apply the buffer changes
to the readable view.
|
boolean |
contains(java.lang.Object o) |
boolean |
containsAll(java.util.Collection<?> c) |
boolean |
equals(java.lang.Object o) |
java.util.Set<E> |
getSnapshot()
Returns a snapshot of the readable view of this HashSet at the
time this method is called.
|
java.util.Set<E> |
getTransaction()
Returns the transactional buffer.
|
int |
hashCode() |
boolean |
isEmpty() |
java.util.Iterator<E> |
iterator() |
boolean |
remove(java.lang.Object o)
Updates the write buffer to reflect the removal of the specified element.
|
boolean |
removeAll(java.util.Collection<?> c)
Updates the write buffer to reflect the removal of the specified elements.
|
boolean |
retainAll(java.util.Collection<?> c)
Updates the write buffer to reflect the retention of the specified elements.
|
int |
size() |
java.lang.Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
java.lang.String |
toString() |
public java.util.Set<E> getTransaction()
public void commit()
public java.util.Set<E> getSnapshot()
public int size()
public boolean isEmpty()
public boolean contains(java.lang.Object o)
public java.util.Iterator<E> iterator()
public java.lang.Object[] toArray()
public <T> T[] toArray(T[] a)
public boolean add(E e)
public boolean remove(java.lang.Object o)
public boolean containsAll(java.util.Collection<?> c)
public boolean addAll(java.util.Collection<? extends E> c)
public boolean retainAll(java.util.Collection<?> c)
public boolean removeAll(java.util.Collection<?> c)
public void clear()
public boolean equals(java.lang.Object o)
public int hashCode()
public java.lang.String toString()
toString
in class java.lang.Object