| java.lang.Object org.apache.commons.collections.collection.SynchronizedCollection org.apache.commons.collections.list.SynchronizedList
SynchronizedList | public class SynchronizedList extends SynchronizedCollection implements List(Code) | | Decorates another List to synchronize its behaviour
for a multi-threaded environment.
Methods are synchronized, then forwarded to the decorated list.
This class is Serializable from Commons Collections 3.1.
since: Commons Collections 3.0 version: $Revision: 155406 $ $Date: 2005-02-26 12:55:26 +0000 (Sat, 26 Feb 2005) $ author: Stephen Colebourne |
SynchronizedList | protected SynchronizedList(List list)(Code) | | Constructor that wraps (not copies).
Parameters: list - the list to decorate, must not be null throws: IllegalArgumentException - if list is null |
SynchronizedList | protected SynchronizedList(List list, Object lock)(Code) | | Constructor that wraps (not copies).
Parameters: list - the list to decorate, must not be null Parameters: lock - the lock to use, must not be null throws: IllegalArgumentException - if list is null |
decorate | public static List decorate(List list)(Code) | | Factory method to create a synchronized list.
Parameters: list - the list to decorate, must not be null throws: IllegalArgumentException - if list is null |
getList | protected List getList()(Code) | | Gets the decorated list.
the decorated list |
listIterator | public ListIterator listIterator()(Code) | | Iterators must be manually synchronized.
synchronized (coll) {
ListIterator it = coll.listIterator();
// do stuff with iterator
}
an iterator that must be manually synchronized on the collection |
listIterator | public ListIterator listIterator(int index)(Code) | | Iterators must be manually synchronized.
synchronized (coll) {
ListIterator it = coll.listIterator(3);
// do stuff with iterator
}
an iterator that must be manually synchronized on the collection |
subList | public List subList(int fromIndex, int toIndex)(Code) | | |
|
|