public class TrackableLazySet<E> extends HashSet<E> implements TrackableCollectionIF<E>
Modifier and Type | Field and Description |
---|---|
protected Set<E> |
added |
protected int |
field |
protected IdentityIF |
identity |
protected boolean |
loaded |
protected Set<E> |
removed |
protected TransactionIF |
txn |
Constructor and Description |
---|
TrackableLazySet(TransactionIF txn,
IdentityIF identity,
int field) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(E o) |
boolean |
addAll(Collection<? extends E> c) |
boolean |
addWithTracking(E _o)
INTERNAL: Adds the item to the collection tracking the change.
|
void |
clear() |
void |
clearWithTracking()
INTERNAL: Removes all items from the collection tracking the
changes.
|
boolean |
contains(Object o) |
boolean |
containsAll(Collection<?> c) |
void |
dump() |
boolean |
equals(Object o) |
Collection<E> |
getAdded()
INTERNAL: Gets the objects that have been added to the set.
|
Collection<E> |
getRemoved()
INTERNAL: Gets the objects that have been removed from the
set.
|
int |
hashCode() |
boolean |
isEmpty() |
boolean |
isLoaded() |
Iterator<E> |
iterator() |
protected void |
loadField() |
boolean |
remove(Object o) |
boolean |
removeAll(Collection<?> c) |
boolean |
removeWithTracking(E _o)
INTERNAL: Removes the item from the collection tracking the
change.
|
void |
resetTracking()
INTERNAL: Clears the list of added and removed objects without
touching the original collection.
|
boolean |
retainAll(Collection<?> c) |
void |
selfAdded()
INTERNAL: Consider existing collection elements as having just
been added.
|
int |
size() |
Spliterator<E> |
spliterator() |
Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
toString
finalize, getClass, notify, notifyAll, wait, wait, wait
parallelStream, removeIf, stream
protected TransactionIF txn
protected IdentityIF identity
protected int field
protected boolean loaded
public TrackableLazySet(TransactionIF txn, IdentityIF identity, int field)
public void dump()
public void resetTracking()
TrackableCollectionIF
resetTracking
in interface TrackableCollectionIF<E>
public void selfAdded()
TrackableCollectionIF
selfAdded
in interface TrackableCollectionIF<E>
public Collection<E> getAdded()
TrackableCollectionIF
getAdded
in interface TrackableCollectionIF<E>
public Collection<E> getRemoved()
TrackableCollectionIF
getRemoved
in interface TrackableCollectionIF<E>
public boolean addWithTracking(E _o)
TrackableCollectionIF
addWithTracking
in interface TrackableCollectionIF<E>
public boolean removeWithTracking(E _o)
TrackableCollectionIF
removeWithTracking
in interface TrackableCollectionIF<E>
public void clearWithTracking()
TrackableCollectionIF
clearWithTracking
in interface TrackableCollectionIF<E>
public void clear()
public boolean add(E o)
public boolean addAll(Collection<? extends E> c)
addAll
in interface Collection<E>
addAll
in interface Set<E>
addAll
in class AbstractCollection<E>
public boolean remove(Object o)
public boolean removeAll(Collection<?> c)
removeAll
in interface Collection<E>
removeAll
in interface Set<E>
removeAll
in class AbstractSet<E>
public boolean retainAll(Collection<?> c)
retainAll
in interface Collection<E>
retainAll
in interface Set<E>
retainAll
in class AbstractCollection<E>
public boolean contains(Object o)
public boolean containsAll(Collection<?> c)
containsAll
in interface Collection<E>
containsAll
in interface Set<E>
containsAll
in class AbstractCollection<E>
public boolean equals(Object o)
equals
in interface Collection<E>
equals
in interface Set<E>
equals
in class AbstractSet<E>
public int hashCode()
hashCode
in interface Collection<E>
hashCode
in interface Set<E>
hashCode
in class AbstractSet<E>
public boolean isEmpty()
public int size()
public Object[] toArray()
toArray
in interface Collection<E>
toArray
in interface Set<E>
toArray
in class AbstractCollection<E>
public <T> T[] toArray(T[] a)
toArray
in interface Collection<E>
toArray
in interface Set<E>
toArray
in class AbstractCollection<E>
public boolean isLoaded()
protected void loadField()
public Spliterator<E> spliterator()
spliterator
in interface Iterable<E>
spliterator
in interface Collection<E>
spliterator
in interface Set<E>
spliterator
in class HashSet<E>