sofya.mutator
Class StandardMutationTable

java.lang.Object
  extended by sofya.mutator.MutationTable
      extended by sofya.mutator.StandardMutationTable

public class StandardMutationTable
extends MutationTable

A standard in-memory mutation table.

Large mutation tables may cause resource consumption problems.

Version:
10/03/2005
Author:
Alex Kinneer

Constructor Summary
StandardMutationTable()
          Creates a new mutation table.
StandardMutationTable(StringTable st)
          Creates a new mutation table.
 
Method Summary
 boolean addMutation(Mutation m)
          Adds a mutation to this mutation table.
 StringTable getStringTable()
          Gets the string table that may be used to compact strings in the mutation table (optional operation).
 java.util.Iterator iterator()
          Gets an iterator over the mutations stored in this mutation table (optional 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

StandardMutationTable

public StandardMutationTable()
Creates a new mutation table.


StandardMutationTable

public StandardMutationTable(StringTable st)
Creates a new mutation table.

Parameters:
st - String table to be used/extended when adding new mutations to this table. Supports persistence of string encodings if this table was previously read from file.
Method Detail

addMutation

public boolean addMutation(Mutation m)
Description copied from class: MutationTable
Adds a mutation to this mutation table.

Specified by:
addMutation in class MutationTable
Parameters:
m - Mutation to be added to this table.
Returns:
true if the mutation was successfully added to this table.

iterator

public java.util.Iterator iterator()
Description copied from class: MutationTable
Gets an iterator over the mutations stored in this mutation table (optional operation).

Specified by:
iterator in class MutationTable
Returns:
An iterator over the mutations in this mutation table.

size

public int size()
Description copied from class: MutationTable
Gets the size of this mutation table.

Specified by:
size in class MutationTable
Returns:
The number of mutations stored in this mutation table.

getStringTable

public StringTable getStringTable()
Description copied from class: MutationTable
Gets the string table that may be used to compact strings in the mutation table (optional operation).

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.

Specified by:
getStringTable in class MutationTable
Returns:
The string table used to compact strings in the mutation table.