|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--java.util.AbstractCollection
|
+--java.util.AbstractList
|
+--java.util.ArrayList
|
+--blackboard.base.SharableArrayList
|
+--blackboard.base.BbList
|
+--blackboard.base.BbDeleteTrackingList
An extension of BbList that maintains a tracking set of elements that have been
removed through one mechanism or another. Useful within the persistence framework to track
child objects attached to heavyweight objects, and delete them as needed.
For instance, imagine a class Foo, containing an array of Bar objects. When a Foo instance is loaded, and then one of the Bar elements is removed from its list, it would be difficult to update the database to reflect the deletion of that object. Now, however, a call to getDeletedElements() returns a complete set of elements unlinked one way or another.
Note: This class is typically for Blackboard-only use and should be considered unstable.
List,
Serialized Form| Nested Class Summary |
| Nested classes inherited from class blackboard.base.BbList |
BbList.Iterator |
| Field Summary |
| Fields inherited from class java.util.AbstractList |
modCount |
| Constructor Summary | |
BbDeleteTrackingList()
Default Constructor. |
|
BbDeleteTrackingList(java.lang.Class typeClass)
Constructs a BbList designated to only accept objects that are instances of the
object represented by the provided Class value for addition to the list. |
|
| Method Summary | |
void |
add(int index,
java.lang.Object element)
Inserts the specified element at the specified position in this list. |
boolean |
add(java.lang.Object o)
Appends the specified element to this list. |
boolean |
addAll(java.util.Collection c)
Appends all of the elements in the specified Collection to the end of this list, in the order that they are returned by the specified Collection's Iterator. |
boolean |
addAll(int index,
java.util.Collection c)
Inserts all of the elements in the specified Collection to the end of this list, in the order that they are returned by the specified Collection's Iterator. |
void |
clear()
Removes all of the elements from this list. |
java.util.Collection |
getDeletedElements()
Returns a collection of all elements removed through one mechanism or another. |
java.lang.Object |
remove(int index)
Removes the element at the specified position in this list. |
boolean |
remove(java.lang.Object o)
Removes a single instance of the specified element from this collection, if it is present. |
boolean |
removeAll(java.util.Collection c)
Removes from this list all the elements that are contained in the specified collection. |
boolean |
retainAll(java.util.Collection c)
Retains only the elements in this list that are not contained in the specified collection. |
java.lang.Object |
set(int index,
java.lang.Object element)
Replaces the element at the specified position in this list with the specified element. |
| Methods inherited from class blackboard.base.BbList |
getFilteredSubList, getFilteringIterator, getFilteringIterator |
| Methods inherited from class blackboard.base.SharableArrayList |
debug, getSubList, trimList |
| Methods inherited from class java.util.ArrayList |
clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, removeRange, size, toArray, toArray, trimToSize |
| Methods inherited from class java.util.AbstractList |
equals, hashCode, iterator, listIterator, listIterator, subList |
| Methods inherited from class java.util.AbstractCollection |
containsAll, toString |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.List |
containsAll, equals, hashCode, iterator, listIterator, listIterator, subList |
| Constructor Detail |
public BbDeleteTrackingList()
public BbDeleteTrackingList(java.lang.Class typeClass)
BbList designated to only accept objects that are instances of the
object represented by the provided Class value for addition to the list. Any
attempt to add objects of a different type will result in an exception being thrown.
An example declaration of a BbList designed to only contain object of type
Integer:
BbList list = new BbList( Integer.class ); list.add( new Integer( 1 ) ); <-- successful list.add( new Float( 1.0 ) ); <-- throws IllegalArgumentException
typeClass - An instance of Class that represents the type of object that can be
added to the list| Method Detail |
public void add(int index,
java.lang.Object element)
add in interface java.util.Listadd in class BbListindex - The index at which the specified element is to be insertedelement - The element to be inserted
java.lang.IndexOutOfBoundsException - If the index is out of range
(index < 0 || index > size())public boolean add(java.lang.Object o)
add in interface java.util.Listadd in class BbListo - The object to be addedpublic boolean addAll(java.util.Collection c)
addAll in interface java.util.ListaddAll in class java.util.ArrayListc - The collection to be added
public boolean addAll(int index,
java.util.Collection c)
addAll in interface java.util.ListaddAll in class java.util.ArrayListindex - The index at which the specified collection is to be insertedc - The collection to be added
java.lang.IndexOutOfBoundsException - If the index is out of range
(index < 0 || index > size())public void clear()
clear in interface java.util.Listclear in class java.util.ArrayListpublic java.lang.Object remove(int index)
remove in interface java.util.Listremove in class java.util.ArrayListindex - The index of the element to be removed
java.lang.IndexOutOfBoundsException - If the index is out of range
(index < 0 || index > size())public boolean remove(java.lang.Object o)
remove in interface java.util.Listremove in class java.util.AbstractCollectiono - The element to be removed from the collection, if present
true If the collection contained the specified element
java.lang.UnsupportedOperationException - If the remove method is not supported by
this collectionpublic boolean removeAll(java.util.Collection c)
removeAll in interface java.util.ListremoveAll in class java.util.AbstractCollectionc - The collection that defines which elements will be removedpublic boolean retainAll(java.util.Collection c)
retainAll in interface java.util.ListretainAll in class java.util.AbstractCollectionc - The collection that defines which elements will be retained
public java.lang.Object set(int index,
java.lang.Object element)
set in interface java.util.Listset in class BbListindex - The index of the element to replaceelement - The element to be stored at the specified position
java.lang.IndexOutOfBoundsException - if index out of range
(index < 0 || index >= size())public java.util.Collection getDeletedElements()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||