EDU.oswego.cs.dl.util.concurrent
Class CopyOnWriteArrayList.COWSubList

java.lang.Object
  extended byjava.util.AbstractCollection
      extended byjava.util.AbstractList
          extended byEDU.oswego.cs.dl.util.concurrent.CopyOnWriteArrayList.COWSubList
All Implemented Interfaces:
Collection, List
Enclosing class:
CopyOnWriteArrayList

protected static class CopyOnWriteArrayList.COWSubList
extends AbstractList


Nested Class Summary
protected  class CopyOnWriteArrayList.COWSubList.COWSubListIterator
           
 
Field Summary
protected  Object[] expectedArray
           
protected  CopyOnWriteArrayList l
           
protected  int offset
           
protected  int size
           
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
protected CopyOnWriteArrayList.COWSubList(CopyOnWriteArrayList list, int fromIndex, int toIndex)
           
 
Method Summary
 void add(int index, Object element)
           
protected  void checkForComodification()
           
 Object get(int index)
           
 Iterator iterator()
           
 ListIterator listIterator(int index)
           
protected  void rangeCheck(int index)
           
 Object remove(int index)
           
 Object set(int index, Object element)
           
 int size()
           
 List subList(int fromIndex, int toIndex)
           
 
Methods inherited from class java.util.AbstractList
add, addAll, clear, equals, hashCode, indexOf, lastIndexOf, listIterator, removeRange
 
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

l

protected final CopyOnWriteArrayList l

offset

protected final int offset

size

protected int size

expectedArray

protected Object[] expectedArray
Constructor Detail

CopyOnWriteArrayList.COWSubList

protected CopyOnWriteArrayList.COWSubList(CopyOnWriteArrayList list,
                                          int fromIndex,
                                          int toIndex)
Method Detail

checkForComodification

protected void checkForComodification()

rangeCheck

protected void rangeCheck(int index)

set

public Object set(int index,
                  Object element)

get

public Object get(int index)

size

public int size()

add

public void add(int index,
                Object element)

remove

public Object remove(int index)

iterator

public Iterator iterator()

listIterator

public ListIterator listIterator(int index)

subList

public List subList(int fromIndex,
                    int toIndex)