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

    java.lang.Object
      java.util.AbstractCollection<E>
          java.util.AbstractList
              EDU.oswego.cs.dl.util.concurrent.CopyOnWriteArrayList.COWSubList

All Implemented Interfaces:
  java.lang.Iterable, 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)

  Specified by:
    `set` in interface `java.util.List`
  Overrides:
    `set` in class `java.util.AbstractList`

### get

    public java.lang.Object get(int index)

  Specified by:
    `get` in interface `java.util.List`
  Specified by:
    `get` in class `java.util.AbstractList`

### size

    public int size()

  Specified by:
    `size` in interface `java.util.Collection`
  Specified by:
    `size` in interface `java.util.List`
  Specified by:
    `size` in class `java.util.AbstractCollection`

### add

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

  Specified by:
    `add` in interface `java.util.List`
  Overrides:
    `add` in class `java.util.AbstractList`

### remove

    public java.lang.Object remove(int index)

  Specified by:
    `remove` in interface `java.util.List`
  Overrides:
    `remove` in class `java.util.AbstractList`

### iterator

    public java.util.Iterator iterator()

  Specified by:
    `iterator` in interface `java.lang.Iterable`
  Specified by:
    `iterator` in interface `java.util.Collection`
  Specified by:
    `iterator` in interface `java.util.List`
  Overrides:
    `iterator` in class `java.util.AbstractList`

### listIterator

    public java.util.ListIterator listIterator(int index)

  Specified by:
    `listIterator` in interface `java.util.List`
  Overrides:
    `listIterator` in class `java.util.AbstractList`

### subList

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

  Specified by:
    `subList` in interface `java.util.List`
  Overrides:
    `subList` in class `java.util.AbstractList`