|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object sofya.mutator.MutationTable sofya.mutator.FileWriterMutationTable
public class FileWriterMutationTable
A mutation table that writes mutations to file as they are received.
Constructor Summary | |
---|---|
FileWriterMutationTable(java.lang.String outputName)
Creates a new mutation table. |
|
FileWriterMutationTable(java.lang.String outputName,
StringTable st)
Creates a new mutation table. |
Method Summary | |
---|---|
boolean |
addMutation(Mutation m)
Adds a mutation to this mutation table. |
void |
close()
Closes the underlying file containing the mutation table; this method must be called to successfully commit the mutation table to file! |
StringTable |
getStringTable()
Gets the string table that may be used to compact strings in the mutation table (optional operation). |
java.util.Iterator |
iterator()
Unsupported operation. |
int |
size()
Gets the size of this mutation table. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FileWriterMutationTable(java.lang.String outputName) throws java.io.IOException
outputName
- Name of the file to which the mutation table will
be written.
java.io.IOException
public FileWriterMutationTable(java.lang.String outputName, StringTable st) throws java.io.IOException
outputName
- Name of the file to which the mutation table will
be written.st
- String table to be used/extended as the mutation table
is written. This provides persistence of the string encodings if
this mutation table was previously read from file.
java.io.IOException
Method Detail |
---|
public boolean addMutation(Mutation m)
MutationTable
addMutation
in class MutationTable
m
- Mutation to be added to this table.
true
if the mutation was successfully added to
this table.public java.util.Iterator iterator()
iterator
in class MutationTable
public int size()
MutationTable
size
in class MutationTable
public StringTable getStringTable()
MutationTable
In some situations, this method assists in supporting persistence
between file reads and writes. Implementations that do not wish
to support this functionality should return null
.
getStringTable
in class MutationTable
public void close() throws java.io.IOException
java.io.IOException
- If there is a stored error that was raised while
attempting to write a mutation to the file.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |