|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjdsl.core.ref.AbstractArrayIterator
A class abstracting the common parts of ArrayPositionIterator and ArrayLocatorIterator.
Field Summary | |
protected int |
iCurrentIndex_
|
protected int |
iLastIndex_
|
Constructor Summary | |
protected |
AbstractArrayIterator(Accessor[] array)
Uses the array to store the elements that this iterator traverses. |
protected |
AbstractArrayIterator(Accessor[] array,
int num)
Traverses through the array until the first num elements have been returned. |
Method Summary | |
protected void |
checkBeforeStart()
|
Object |
element()
|
boolean |
hasNext()
|
protected Accessor |
nextAccessor()
|
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 |
protected AbstractArrayIterator(Accessor[] array)
array
- The elements that this iterator should traverse.protected AbstractArrayIterator(Accessor[] array, int num) throws BoundaryViolationException
Method Detail |
public boolean hasNext()
public Object element() throws NoSuchElementException
NoSuchElementException
public Object nextObject()
public Object object() throws NoSuchElementException
NoSuchElementException
public void reset()
protected void checkBeforeStart() throws NoSuchElementException
NoSuchElementException
protected Accessor nextAccessor()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |