| 
 | ||||||||||
| PREV CLASS (src) NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractCollection
java.util.AbstractList
org.jboss.util.collection.CachedList
A wrapper around a List which translates added objects
 into SoftObject (src)  references, allowing the VM to garbage collect
 objects in the collection when memory is low.
| Field Summary | |
| protected  java.util.List | listWrapped list. | 
| protected  java.lang.ref.ReferenceQueue | queueReference queue. | 
| Fields inherited from class java.util.AbstractList | 
| modCount | 
| Constructor Summary | |
| CachedList()Construct a CachedList using a LinkedList for storage. | |
| CachedList(java.util.List list)Construct a CachedList. | |
| Method Summary | |
|  void | add(int index,
    java.lang.Object obj)Inserts the specified element at the specified position in this list (optional operation). | 
|  java.lang.Object | get(int index)Returns the element at the specified position in this list. | 
|  java.lang.Object | remove(int index)Removes the element at the specified position in this list (optional operation). | 
|  java.lang.Object | set(int index,
    java.lang.Object obj)Replaces the element at the specified position in this list with the specified element. | 
|  int | size()Return the size of the list. | 
| Methods inherited from class java.util.AbstractList | 
| add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, removeRange, subList | 
| Methods inherited from class java.util.AbstractCollection | 
| addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString | 
| Methods inherited from class java.lang.Object | 
| clone, finalize, getClass, notify, notifyAll, wait, wait, wait | 
| Methods inherited from interface java.util.List | 
| addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray | 
| Field Detail | 
protected final java.lang.ref.ReferenceQueue queue
protected final java.util.List list
| Constructor Detail | 
public CachedList(java.util.List list)
list - List to wrap.public CachedList()
| Method Detail | 
public java.lang.Object get(int index)
index - Index of element to return.
public int size()
public java.lang.Object set(int index,
                            java.lang.Object obj)
index - Index of element to replace.obj - Element to be stored at the specified postion.
public void add(int index,
                java.lang.Object obj)
index - Index at which the specified element is to be inserted.obj - Element to be inserted.public java.lang.Object remove(int index)
index - The index of the element to remove.
| 
 | ||||||||||
| PREV CLASS (src) NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||