net.kano.joscar
Class CopyOnWriteArrayList.COWSubList

java.lang.Object
  extended byjava.util.AbstractCollection
      extended byjava.util.AbstractList
          extended bynet.kano.joscar.CopyOnWriteArrayList.COWSubList
All Implemented Interfaces:
java.util.Collection, java.util.List
Enclosing class:
CopyOnWriteArrayList

protected static class CopyOnWriteArrayList.COWSubList
extends java.util.AbstractList


Nested Class Summary
protected  class CopyOnWriteArrayList.COWSubList.COWSubListIterator
           
 
Field Summary
protected  java.lang.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, java.lang.Object element)
           
protected  void checkForComodification()
           
 java.lang.Object get(int index)
           
 java.util.Iterator iterator()
           
 java.util.ListIterator listIterator(int index)
           
protected  void rangeCheck(int index)
           
 java.lang.Object remove(int index)
           
 java.lang.Object set(int index, java.lang.Object element)
           
 int size()
           
 java.util.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 java.lang.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 java.lang.Object set(int index,
                            java.lang.Object element)

get

public java.lang.Object get(int index)

size

public int size()

add

public void add(int index,
                java.lang.Object element)

remove

public java.lang.Object remove(int index)

iterator

public java.util.Iterator iterator()

listIterator

public java.util.ListIterator listIterator(int index)

subList

public java.util.List subList(int fromIndex,
                              int toIndex)