T - type of element in arraypublic class ArrayIterator<T> extends Object implements Iterator<T>
| Constructor and Description |
|---|
ArrayIterator(T[] a)
Construct an iterator over the provided array
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasNext() |
T |
next() |
void |
remove() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemainingpublic ArrayIterator(T[] a)
a - the arraypublic T next() throws NoSuchElementException
next in interface Iterator<T>NoSuchElementExceptionpublic void remove() throws UnsupportedOperationException, IllegalStateException
remove in interface Iterator<T>UnsupportedOperationExceptionIllegalStateException