EDU.oswego.cs.dl.util.concurrent

Class CopyOnWriteArrayList.COWIterator

Enclosing Class:
CopyOnWriteArrayList
Implemented Interfaces:
ListIterator

protected static class CopyOnWriteArrayList.COWIterator
extends java.lang.Object
implements ListIterator

Field Summary

protected Object[]
array
Snapshot of the array *
protected int
cursor
Index of element to be returned by subsequent call to next.

Constructor Summary

COWIterator(Object[] elementArray, int initialCursor)

Method Summary

void
add(Object o)
Not supported.
boolean
hasNext()
boolean
hasPrevious()
Object
next()
int
nextIndex()
Object
previous()
int
previousIndex()
void
remove()
Not supported.
void
set(Object o)
Not supported.

Field Details

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 Details

COWIterator

protected COWIterator(Object[] elementArray,
                      int initialCursor)

Method Details

add

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

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.

set

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