Package EDU.oswego.cs.dl.util.concurrent
Class CopyOnWriteArrayList.COWIterator
- java.lang.Object
-
- EDU.oswego.cs.dl.util.concurrent.CopyOnWriteArrayList.COWIterator
-
- All Implemented Interfaces:
Iterator,ListIterator
- Enclosing class:
- CopyOnWriteArrayList
protected static class CopyOnWriteArrayList.COWIterator extends Object implements ListIterator
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedCOWIterator(Object[] elementArray, int initialCursor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(Object o)Not supported.booleanhasNext()booleanhasPrevious()Objectnext()intnextIndex()Objectprevious()intpreviousIndex()voidremove()Not supported.voidset(Object o)Not supported.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining
-
-
-
-
Field Detail
-
array
protected final Object[] array
Snapshot of the array
-
cursor
protected int cursor
Index of element to be returned by subsequent call to next.
-
-
Constructor Detail
-
COWIterator
protected COWIterator(Object[] elementArray, int initialCursor)
-
-
Method Detail
-
hasNext
public boolean hasNext()
- Specified by:
hasNextin interfaceIterator- Specified by:
hasNextin interfaceListIterator
-
hasPrevious
public boolean hasPrevious()
- Specified by:
hasPreviousin interfaceListIterator
-
next
public Object next()
- Specified by:
nextin interfaceIterator- Specified by:
nextin interfaceListIterator
-
previous
public Object previous()
- Specified by:
previousin interfaceListIterator
-
nextIndex
public int nextIndex()
- Specified by:
nextIndexin interfaceListIterator
-
previousIndex
public int previousIndex()
- Specified by:
previousIndexin interfaceListIterator
-
remove
public void remove()
Not supported. Always throws UnsupportedOperationException.- Specified by:
removein interfaceIterator- Specified by:
removein interfaceListIterator- Throws:
UnsupportedOperationException- remove is not supported by this Iterator.
-
set
public void set(Object o)
Not supported. Always throws UnsupportedOperationException.- Specified by:
setin interfaceListIterator- Throws:
UnsupportedOperationException- set is not supported by this Iterator.
-
add
public void add(Object o)
Not supported. Always throws UnsupportedOperationException.- Specified by:
addin interfaceListIterator- Throws:
UnsupportedOperationException- add is not supported by this Iterator.
-
-