|
JML | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jmlspecs.jmlunit.strategies.CompositeIterator
Composition of several indefinite iterators.
IndefiniteIterator| Field Summary | |
private int |
currentIterator
What iterator we are working with now. |
private IndefiniteIterator[] |
iters
The iterators that are being sequenced |
| Constructor Summary | |
protected |
CompositeIterator(int currentIterator,
IndefiniteIterator[] iters)
Initialize this composite to iterate over clones of the given iterators, in order, starting at the given current iterator. |
|
CompositeIterator(IndefiniteIterator iter)
Initialize this composite to iterate over the given iterator. |
|
CompositeIterator(IndefiniteIterator iter1,
IndefiniteIterator iter2)
Initialize this composite to iterate over the given iterators, in order. |
|
CompositeIterator(IndefiniteIterator[] iters)
Initialize this composite to iterate over clones of the given iterators, in order. |
| 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. |
Object |
get()
Return the next element in this iteration. |
private void |
setCurrentIterator()
Set the current iterator to the next one that has elements, if any. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
private int currentIterator
private final IndefiniteIterator[] iters
| Constructor Detail |
public CompositeIterator(IndefiniteIterator iter)
public CompositeIterator(IndefiniteIterator iter1,
IndefiniteIterator iter2)
public CompositeIterator(IndefiniteIterator[] iters)
protected CompositeIterator(int currentIterator,
IndefiniteIterator[] iters)
| Method Detail |
public boolean atEnd()
IndefiniteIterator
atEnd in interface IndefiniteIteratorpublic Object get()
get in interface IndefiniteIteratorNoSuchElementException;public void advance()
IndefiniteIterator
advance in interface IndefiniteIteratorprivate void setCurrentIterator()
public Object clone()
IndefiniteIterator
clone in interface IndefiniteIteratorclone in class Objectpublic String toString()
toString in class Object
|
JML | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||