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. |
Modifier and Type | Method and Description |
---|---|
boolean |
hasNext() |
E |
next() |
void |
remove()
This operation is not supported.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEachRemaining
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