|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjdsl.core.ref.ArrayObjectIterator
An array-based object iterator.
Field Summary | |
protected int |
iCurrentIndex_
|
protected int |
iLastIndex_
|
Constructor Summary | |
ArrayObjectIterator(Object[] array)
Uses the array to store the elements that this iterator traverses. |
|
ArrayObjectIterator(Object[] array,
int num)
Traverses through the array, which is not copied, until num elements have been returned. |
Method Summary | |
boolean |
hasNext()
Takes O(1) time |
Object |
nextObject()
Takes O(1) time |
Object |
object()
Takes O(1) time |
void |
reset()
Takes O(1) time |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected int iCurrentIndex_
protected int iLastIndex_
Constructor Detail |
public ArrayObjectIterator(Object[] array)
array
- The elements that this iterator should traverse.public ArrayObjectIterator(Object[] array, int num) throws BoundaryViolationException
Method Detail |
public boolean hasNext()
hasNext
in interface ObjectIterator
public Object nextObject()
nextObject
in interface ObjectIterator
public Object object() throws NoSuchElementException
object
in interface ObjectIterator
NoSuchElementException
- When the iterator is in its
initial, before-the-first-object statepublic void reset()
reset
in interface ObjectIterator
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |