|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.springsource.util.common.SynchronizedObject
com.springsource.util.common.SynchronizedCollection<T>
com.springsource.util.common.SynchronizedList<T>
T
- the type of the list elementspublic class SynchronizedList<T>
SynchronizedList
wraps a given List
and protects access to the collection and any
iterators created from the collection by synchronizing on a given monitor.
Field Summary | |
---|---|
private java.util.List<T> |
list
|
(package private) java.lang.Object |
monitor
|
Constructor Summary | |
---|---|
SynchronizedList(java.util.List<? extends T> list,
java.lang.Object monitor)
|
Method Summary | |
---|---|
void |
add(int index,
T element)
|
boolean |
addAll(int index,
java.util.Collection<? extends T> c)
|
boolean |
equals(java.lang.Object obj)
|
T |
get(int index)
|
int |
hashCode()
|
int |
indexOf(java.lang.Object o)
|
int |
lastIndexOf(java.lang.Object o)
|
java.util.ListIterator<T> |
listIterator()
|
java.util.ListIterator<T> |
listIterator(int index)
|
T |
remove(int index)
|
T |
set(int index,
T element)
|
java.util.List<T> |
subList(int fromIndex,
int toIndex)
|
Methods inherited from class com.springsource.util.common.SynchronizedCollection |
---|
add, addAll, clear, contains, containsAll, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray |
Methods inherited from class com.springsource.util.common.SynchronizedObject |
---|
toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.List |
---|
add, addAll, clear, contains, containsAll, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray |
Field Detail |
---|
final java.lang.Object monitor
private final java.util.List<T> list
Constructor Detail |
---|
public SynchronizedList(java.util.List<? extends T> list, java.lang.Object monitor)
Method Detail |
---|
public void add(int index, T element)
add
in interface java.util.List<T>
public boolean addAll(int index, java.util.Collection<? extends T> c)
addAll
in interface java.util.List<T>
public T get(int index)
get
in interface java.util.List<T>
public int indexOf(java.lang.Object o)
indexOf
in interface java.util.List<T>
public int lastIndexOf(java.lang.Object o)
lastIndexOf
in interface java.util.List<T>
public java.util.ListIterator<T> listIterator()
listIterator
in interface java.util.List<T>
public java.util.ListIterator<T> listIterator(int index)
listIterator
in interface java.util.List<T>
public T remove(int index)
remove
in interface java.util.List<T>
public T set(int index, T element)
set
in interface java.util.List<T>
public java.util.List<T> subList(int fromIndex, int toIndex)
subList
in interface java.util.List<T>
public int hashCode()
hashCode
in interface java.util.Collection<T>
hashCode
in interface java.util.List<T>
hashCode
in class SynchronizedCollection<T>
public boolean equals(java.lang.Object obj)
equals
in interface java.util.Collection<T>
equals
in interface java.util.List<T>
equals
in class SynchronizedCollection<T>
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |