EDU.oswego.cs.dl.util.concurrent

Class CopyOnWriteArrayList.COWIterator

protected static class CopyOnWriteArrayList.COWIterator extends Object implements ListIterator

Field Summary
protected Object[]array
Snapshot of the array *
protected intcursor
Index of element to be returned by subsequent call to next.
Constructor Summary
protected COWIterator(Object[] elementArray, int initialCursor)
Method Summary
voidadd(Object o)
Not supported.
booleanhasNext()
booleanhasPrevious()
Objectnext()
intnextIndex()
Objectprevious()
intpreviousIndex()
voidremove()
Not supported.
voidset(Object o)
Not supported.

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

add

public void add(Object o)
Not supported. Always throws UnsupportedOperationException.

Throws: UnsupportedOperationException add is not supported by this Iterator.

hasNext

public boolean hasNext()

hasPrevious

public boolean hasPrevious()

next

public Object next()

nextIndex

public int nextIndex()

previous

public Object previous()

previousIndex

public int previousIndex()

remove

public void remove()
Not supported. Always throws UnsupportedOperationException.

Throws: UnsupportedOperationException remove is not supported by this Iterator.

set

public void set(Object o)
Not supported. Always throws UnsupportedOperationException.

Throws: UnsupportedOperationException set is not supported by this Iterator.