|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.AbstractCollection<E> java.util.AbstractSet<E> java.util.HashSet net.ontopia.persistence.proxy.TrackableSet
public class TrackableSet
INTERNAL: A set implementation that track the changes performed on it. It keeps track of the objects that have been added and the ones that has been removed.
Field Summary | |
---|---|
protected java.util.Set |
added
|
protected java.util.Set |
removed
|
protected TransactionIF |
txn
|
Constructor Summary | |
---|---|
TrackableSet(TransactionIF txn,
java.util.Collection coll)
|
Method Summary | |
---|---|
boolean |
add(java.lang.Object o)
|
boolean |
addAll(java.util.Collection c)
|
boolean |
addWithTracking(java.lang.Object _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(java.lang.Object o)
|
boolean |
containsAll(java.util.Collection c)
|
void |
dump()
|
java.util.Collection |
getAdded()
INTERNAL: Gets the objects that have been added to the set. |
java.util.Collection |
getRemoved()
INTERNAL: Gets the objects that have been removed from the set. |
java.util.Iterator |
iterator()
|
boolean |
remove(java.lang.Object o)
|
boolean |
removeAll(java.util.Collection c)
|
boolean |
removeWithTracking(java.lang.Object _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(java.util.Collection c)
|
void |
selfAdded()
INTERNAL: Consider existing collection elements as having just been added. |
java.lang.Object[] |
toArray()
|
java.lang.Object[] |
toArray(java.lang.Object[] a)
|
Methods inherited from class java.util.HashSet |
---|
clone, isEmpty, size |
Methods inherited from class java.util.AbstractSet |
---|
equals, hashCode |
Methods inherited from class java.util.AbstractCollection |
---|
toString |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Collection |
---|
equals, hashCode, isEmpty, size |
Methods inherited from interface java.util.Set |
---|
equals, hashCode |
Field Detail |
---|
protected TransactionIF txn
protected java.util.Set added
protected java.util.Set removed
Constructor Detail |
---|
public TrackableSet(TransactionIF txn, java.util.Collection coll)
Method Detail |
---|
public void dump()
public void resetTracking()
TrackableCollectionIF
resetTracking
in interface TrackableCollectionIF
public void selfAdded()
TrackableCollectionIF
selfAdded
in interface TrackableCollectionIF
public java.util.Collection getAdded()
TrackableCollectionIF
getAdded
in interface TrackableCollectionIF
public java.util.Collection getRemoved()
TrackableCollectionIF
getRemoved
in interface TrackableCollectionIF
public boolean addWithTracking(java.lang.Object _o)
TrackableCollectionIF
addWithTracking
in interface TrackableCollectionIF
public boolean removeWithTracking(java.lang.Object _o)
TrackableCollectionIF
removeWithTracking
in interface TrackableCollectionIF
public void clearWithTracking()
TrackableCollectionIF
clearWithTracking
in interface TrackableCollectionIF
public void clear()
clear
in interface java.util.Collection
clear
in interface java.util.Set
clear
in class java.util.HashSet
public boolean add(java.lang.Object o)
add
in interface java.util.Collection
add
in interface java.util.Set
add
in class java.util.HashSet
public boolean addAll(java.util.Collection c)
addAll
in interface java.util.Collection
addAll
in interface java.util.Set
addAll
in class java.util.AbstractCollection
public boolean remove(java.lang.Object o)
remove
in interface java.util.Collection
remove
in interface java.util.Set
remove
in class java.util.HashSet
public boolean removeAll(java.util.Collection c)
removeAll
in interface java.util.Collection
removeAll
in interface java.util.Set
removeAll
in class java.util.AbstractSet
public boolean retainAll(java.util.Collection c)
retainAll
in interface java.util.Collection
retainAll
in interface java.util.Set
retainAll
in class java.util.AbstractCollection
public java.util.Iterator iterator()
iterator
in interface java.lang.Iterable
iterator
in interface java.util.Collection
iterator
in interface java.util.Set
iterator
in class java.util.HashSet
public boolean contains(java.lang.Object o)
contains
in interface java.util.Collection
contains
in interface java.util.Set
contains
in class java.util.HashSet
public boolean containsAll(java.util.Collection c)
containsAll
in interface java.util.Collection
containsAll
in interface java.util.Set
containsAll
in class java.util.AbstractCollection
public java.lang.Object[] toArray()
toArray
in interface java.util.Collection
toArray
in interface java.util.Set
toArray
in class java.util.AbstractCollection
public java.lang.Object[] toArray(java.lang.Object[] a)
toArray
in interface java.util.Collection
toArray
in interface java.util.Set
toArray
in class java.util.AbstractCollection
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |