EDU.oswego.cs.dl.util.concurrent
public class SyncList extends SyncCollection implements java.util.List
SyncCollection
Modifier and Type | Class and Description |
---|---|
class |
SyncList.SyncCollectionListIterator |
SyncCollection.SyncCollectionIterator
c_, rd_, syncFailures_, wr_
Constructor and Description |
---|
SyncList(java.util.List list,
ReadWriteLock rwl)
Create a new SyncList protecting the given list,
and using the given ReadWriteLock to control reader and writer methods.
|
SyncList(java.util.List list,
Sync sync)
Create a new SyncList protecting the given collection,
and using the given sync to control both reader and writer methods.
|
SyncList(java.util.List list,
Sync readLock,
Sync writeLock)
Create a new SyncList protecting the given list,
and using the given pair of locks to control reader and writer methods.
|
Modifier and Type | Method and Description |
---|---|
void |
add(int index,
java.lang.Object o) |
boolean |
addAll(int index,
java.util.Collection coll) |
protected java.util.List |
baseList() |
boolean |
equals(java.lang.Object o) |
java.lang.Object |
get(int index) |
int |
hashCode() |
int |
indexOf(java.lang.Object o) |
int |
lastIndexOf(java.lang.Object o) |
java.util.ListIterator |
listIterator() |
java.util.ListIterator |
listIterator(int index) |
java.lang.Object |
remove(int index) |
java.lang.Object |
set(int index,
java.lang.Object o) |
java.util.List |
subList(int fromIndex,
int toIndex) |
java.util.ListIterator |
unprotectedListIterator() |
java.util.ListIterator |
unprotectedListIterator(int index) |
add, addAll, afterRead, beforeRead, clear, contains, containsAll, isEmpty, iterator, readerSync, remove, removeAll, retainAll, size, syncFailures, toArray, toArray, unprotectedIterator, writerSync
public SyncList(java.util.List list, Sync sync)
public SyncList(java.util.List list, ReadWriteLock rwl)
protected java.util.List baseList()
public int hashCode()
hashCode
in interface java.util.Collection
hashCode
in interface java.util.List
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in interface java.util.Collection
equals
in interface java.util.List
equals
in class java.lang.Object
public java.lang.Object get(int index)
get
in interface java.util.List
public int indexOf(java.lang.Object o)
indexOf
in interface java.util.List
public int lastIndexOf(java.lang.Object o)
lastIndexOf
in interface java.util.List
public java.util.List subList(int fromIndex, int toIndex)
subList
in interface java.util.List
public java.lang.Object set(int index, java.lang.Object o)
set
in interface java.util.List
public java.lang.Object remove(int index)
remove
in interface java.util.List
public void add(int index, java.lang.Object o)
add
in interface java.util.List
public boolean addAll(int index, java.util.Collection coll)
addAll
in interface java.util.List
public java.util.ListIterator unprotectedListIterator()
public java.util.ListIterator listIterator()
listIterator
in interface java.util.List
public java.util.ListIterator unprotectedListIterator(int index)
public java.util.ListIterator listIterator(int index)
listIterator
in interface java.util.List