|
JML | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jmlspecs.jmlunit.strategies.ObjectArrayAbstractIterator
An indefinite iterator that provides test data from an array of objects passed to its constructor.
This can only handle iterations up to Integer.MAX_VALUE elements.
| Field Summary | |
private Object[] |
elems
The elements |
private int |
next
The next element's index (zero based) |
| Constructor Summary | |
ObjectArrayAbstractIterator(Object[] elems)
Initialize this iterator to iterate over a clone of the array |
|
| Method Summary | |
void |
advance()
Advance the state of this iteration to the next position. |
boolean |
atEnd()
Is this iterator at its end? |
Object |
clone()
Return a copy of this iterator in the same state as this object. |
protected abstract Object |
duplicateIfNeeded(Object elem)
Duplicate the argument if needed. |
protected String |
elementsString()
|
Object |
get()
Return the current element in this iteration. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
private int next
private Object[] elems
| Constructor Detail |
public ObjectArrayAbstractIterator(Object[] elems)
| Method Detail |
public boolean atEnd()
IndefiniteIterator
atEnd in interface IndefiniteIteratorpublic Object get()
IndefiniteIterator
get in interface IndefiniteIteratorprotected abstract Object duplicateIfNeeded(Object elem)
elem - the object to perhaps be duplicated, which may be nullpublic void advance()
IndefiniteIterator
advance in interface IndefiniteIteratorpublic Object clone()
IndefiniteIterator
clone in interface IndefiniteIteratorclone in class Objectpublic String toString()
toString in class Objectprotected String elementsString()
|
JML | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||