Package EDU.oswego.cs.dl.util.concurrent
Class CopyOnWriteArrayList.COWSubList
java.lang.Object
java.util.AbstractCollection
java.util.AbstractList
EDU.oswego.cs.dl.util.concurrent.CopyOnWriteArrayList.COWSubList
- All Implemented Interfaces:
Iterable
,Collection
,List
,SequencedCollection
- Enclosing class:
CopyOnWriteArrayList
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Object[]
protected final CopyOnWriteArrayList
protected final int
protected int
Fields inherited from class java.util.AbstractList
modCount
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
COWSubList
(CopyOnWriteArrayList list, int fromIndex, int toIndex) -
Method Summary
Modifier and TypeMethodDescriptionvoid
protected void
get
(int index) iterator()
listIterator
(int index) protected void
rangeCheck
(int index) remove
(int index) int
size()
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.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface java.util.List
addAll, addFirst, addLast, contains, containsAll, getFirst, getLast, isEmpty, remove, removeAll, removeFirst, removeLast, replaceAll, retainAll, reversed, sort, spliterator, toArray, toArray
-
Field Details
-
l
-
offset
protected final int offset -
size
protected int size -
expectedArray
-
-
Constructor Details
-
COWSubList
-
-
Method Details
-
checkForComodification
protected void checkForComodification() -
rangeCheck
protected void rangeCheck(int index) -
set
- Specified by:
set
in interfaceList
- Overrides:
set
in classAbstractList
-
get
- Specified by:
get
in interfaceList
- Specified by:
get
in classAbstractList
-
size
public int size()- Specified by:
size
in interfaceCollection
- Specified by:
size
in interfaceList
- Specified by:
size
in classAbstractCollection
-
add
- Specified by:
add
in interfaceList
- Overrides:
add
in classAbstractList
-
remove
- Specified by:
remove
in interfaceList
- Overrides:
remove
in classAbstractList
-
iterator
- Specified by:
iterator
in interfaceCollection
- Specified by:
iterator
in interfaceIterable
- Specified by:
iterator
in interfaceList
- Overrides:
iterator
in classAbstractList
-
listIterator
- Specified by:
listIterator
in interfaceList
- Overrides:
listIterator
in classAbstractList
-
subList
- Specified by:
subList
in interfaceList
- Overrides:
subList
in classAbstractList
-