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.
|
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Returns a shallow cloned copy of this object.
|
boolean |
hasNext()
Returns true if there are more elements in the iteration.
|
Object |
next()
Returns the next element in the iteration.
|
void |
remove()
Unsupported.
|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEachRemaining
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 © 2018 JBoss by Red Hat. All rights reserved.