|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object sofya.mutator.MutationIterator
public final class MutationIterator
An iterator over a mutation table stored in a file.
This iterator provides the capability to read a mutation table from file progressively, avoiding the need to preload an entire table into memory.
Method Summary | |
---|---|
void |
close()
Closes the underlying mutation file. |
int |
count()
Gets the number of mutations in this iteration. |
boolean |
hasNext()
Reports whether the iteration has more mutations. |
java.lang.Object |
next()
Gets the next mutation in the iteration; this method is provided to satisfy the standard java.util.Iterator contract. |
Mutation |
nextMutation()
Gets the next mutation in the iteration. |
void |
remove()
Unsupported. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public int count()
public boolean hasNext()
hasNext
in interface java.util.Iterator
true
if the iteration has more mutations.public Mutation nextMutation() throws java.io.IOException
java.io.IOException
- If an error reading the underlying file prevents
the iterator from returning the next mutation.
java.util.NoSuchElementException
- If the iteration does not contain
any more mutations.public java.lang.Object next()
java.util.Iterator
contract.
next
in interface java.util.Iterator
java.util.NoSuchElementException
- If the iteration does not contain
any more mutations, or if an error reading the underlying file
prevents the iterator from returning the next mutation.public void close()
This function is provided to permit cleanup on premature failure of the iteration. The mutation file is automatically closed when the end of the iteration is reached normally.
public void remove()
remove
in interface java.util.Iterator
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |