public class ArrayIterator extends Object implements Iterator, Serializable, Cloneable
Modifier and Type | Field and Description |
---|---|
protected Object[] |
array
Array to iterate over.
|
protected int |
index
The current position in the array.
|
Constructor and Description |
---|
ArrayIterator(Object[] array)
Construct an ArrayIterator.
|
protected final Object[] array
protected int index
public ArrayIterator(Object[] array)
array
- The array to iterate over.public boolean hasNext()
public Object next()
next
in interface Iterator
NoSuchElementException
- The are no more elements available.public void remove()
remove
in interface Iterator
UnsupportedOperationException
Copyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.