|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.elkoserver.util.ArrayIterator<V>
public class ArrayIterator<V>
Iterator over an array of objects. Usable in iterator-based for loops when the underlying array is null, and when you actually need an explicit iterator.
| Constructor Summary | |
|---|---|
ArrayIterator(V[] array)
Constructor. |
|
| Method Summary | |
|---|---|
boolean |
hasNext()
Returns true if the iteration has more elements. |
V |
next()
Returns the next element in the iteration. |
void |
remove()
This operation is not supported. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ArrayIterator(V[] array)
array - The array to iterate over.| Method Detail |
|---|
public boolean hasNext()
next() would return an element rather than
throwing an exception.)
hasNext in interface Iterator<V>public V next()
next in interface Iterator<V>NoSuchElementException - iteration has no more elements.public void remove()
remove in interface Iterator<V>UnsupportedOperationException - always.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||