protected static class CopyOnWriteArrayList.COWIterator
extends java.lang.Object
implements java.util.ListIterator
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.Object[] |
array
Snapshot of the array
|
protected int |
cursor
Index of element to be returned by subsequent call to next.
|
| Modifier | Constructor and Description |
|---|---|
protected |
COWIterator(java.lang.Object[] elementArray,
int initialCursor) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(java.lang.Object o)
Not supported.
|
boolean |
hasNext() |
boolean |
hasPrevious() |
java.lang.Object |
next() |
int |
nextIndex() |
java.lang.Object |
previous() |
int |
previousIndex() |
void |
remove()
Not supported.
|
void |
set(java.lang.Object o)
Not supported.
|
protected final java.lang.Object[] array
protected int cursor
protected COWIterator(java.lang.Object[] elementArray,
int initialCursor)
public boolean hasNext()
hasNext in interface java.util.IteratorhasNext in interface java.util.ListIteratorpublic boolean hasPrevious()
hasPrevious in interface java.util.ListIteratorpublic java.lang.Object next()
next in interface java.util.Iteratornext in interface java.util.ListIteratorpublic java.lang.Object previous()
previous in interface java.util.ListIteratorpublic int nextIndex()
nextIndex in interface java.util.ListIteratorpublic int previousIndex()
previousIndex in interface java.util.ListIteratorpublic void remove()
remove in interface java.util.Iteratorremove in interface java.util.ListIteratorjava.lang.UnsupportedOperationException - remove is not supported
by this Iterator.public void set(java.lang.Object o)
set in interface java.util.ListIteratorjava.lang.UnsupportedOperationException - set is not supported
by this Iterator.public void add(java.lang.Object o)
add in interface java.util.ListIteratorjava.lang.UnsupportedOperationException - add is not supported
by this Iterator.