Modifier and Type | Field and Description |
---|---|
private E[] |
array
The array to iterate.
|
private int |
index
The index of the next element to return.
|
Constructor and Description |
---|
ArrayIterator(E[] array)
Create a new
ArrayIterator object. |
private final E[] array
private int index
public ArrayIterator(E[] array)
ArrayIterator
object.array
- Array to set.public void remove()
remove
in interface Iterator<E>
UnsupportedOperationException
- Is always thrown