|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.embl.ebi.escience.baclava.iterator.LockStepIterator
public class LockStepIterator
Provides an Iterator that iterates over the contained iterators in lock step, incrementing all at the same time.
| Constructor Summary | |
|---|---|
LockStepIterator()
|
|
LockStepIterator(ResumableIterator[] i)
|
|
| Method Summary | |
|---|---|
int[] |
getCurrentLocation()
Get the current location by finding the longest current position array from all the child iterators and returning it. |
boolean |
hasNext()
If the iterator isn't empty then all the iterators contained within it are the same length, can therefore just ask the first one |
java.lang.Object |
next()
Returns an array of items created by calling the next() method of each contained iterator |
void |
remove()
Calls to the remove operation are not allowed from this iterator |
void |
reset()
Reset all the iterators |
int |
size()
All iterators are the same size |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LockStepIterator()
public LockStepIterator(ResumableIterator[] i)
| Method Detail |
|---|
public void reset()
reset in interface ResumableIteratorpublic int[] getCurrentLocation()
getCurrentLocation in interface ResumableIteratorpublic boolean hasNext()
hasNext in interface java.util.Iterator
public void remove()
throws java.lang.UnsupportedOperationException
remove in interface java.util.Iteratorjava.lang.UnsupportedOperationException
public java.lang.Object next()
throws java.util.NoSuchElementException
next in interface java.util.Iteratorjava.util.NoSuchElementExceptionpublic int size()
size in interface ResumableIterator
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||