|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.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 Set |
added
|
protected Set |
removed
|
protected TransactionIF |
txn
|
Constructor Summary | |
---|---|
TrackableSet(TransactionIF txn,
Collection coll)
|
Method Summary | |
---|---|
boolean |
add(Object o)
|
boolean |
addAll(Collection c)
|
boolean |
addWithTracking(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(Object o)
|
boolean |
containsAll(Collection c)
|
void |
dump()
|
Collection |
getAdded()
INTERNAL: Gets the objects that have been added to the set. |
Collection |
getRemoved()
INTERNAL: Gets the objects that have been removed from the set. |
Iterator |
iterator()
|
boolean |
remove(Object o)
|
boolean |
removeAll(Collection c)
|
boolean |
removeWithTracking(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(Collection c)
|
void |
selfAdded()
INTERNAL: Consider existing collection elements as having just been added. |
Object[] |
toArray()
|
Object[] |
toArray(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 Set added
protected Set removed
Constructor Detail |
---|
public TrackableSet(TransactionIF txn, Collection coll)
Method Detail |
---|
public void dump()
public void resetTracking()
TrackableCollectionIF
resetTracking
in interface TrackableCollectionIF
public void selfAdded()
TrackableCollectionIF
selfAdded
in interface TrackableCollectionIF
public Collection getAdded()
TrackableCollectionIF
getAdded
in interface TrackableCollectionIF
public Collection getRemoved()
TrackableCollectionIF
getRemoved
in interface TrackableCollectionIF
public boolean addWithTracking(Object _o)
TrackableCollectionIF
addWithTracking
in interface TrackableCollectionIF
public boolean removeWithTracking(Object _o)
TrackableCollectionIF
removeWithTracking
in interface TrackableCollectionIF
public void clearWithTracking()
TrackableCollectionIF
clearWithTracking
in interface TrackableCollectionIF
public void clear()
clear
in interface Collection
clear
in interface Set
clear
in class HashSet
public boolean add(Object o)
add
in interface Collection
add
in interface Set
add
in class HashSet
public boolean addAll(Collection c)
addAll
in interface Collection
addAll
in interface Set
addAll
in class AbstractCollection
public boolean remove(Object o)
remove
in interface Collection
remove
in interface Set
remove
in class HashSet
public boolean removeAll(Collection c)
removeAll
in interface Collection
removeAll
in interface Set
removeAll
in class AbstractSet
public boolean retainAll(Collection c)
retainAll
in interface Collection
retainAll
in interface Set
retainAll
in class AbstractCollection
public Iterator iterator()
iterator
in interface Iterable
iterator
in interface Collection
iterator
in interface Set
iterator
in class HashSet
public boolean contains(Object o)
contains
in interface Collection
contains
in interface Set
contains
in class HashSet
public boolean containsAll(Collection c)
containsAll
in interface Collection
containsAll
in interface Set
containsAll
in class AbstractCollection
public Object[] toArray()
toArray
in interface Collection
toArray
in interface Set
toArray
in class AbstractCollection
public Object[] toArray(Object[] a)
toArray
in interface Collection
toArray
in interface Set
toArray
in class AbstractCollection
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |