model.filehandling
Class StateFileHandler

java.lang.Object
  extended by model.filehandling.StateFileHandler

public class StateFileHandler
extends java.lang.Object


Constructor Summary
StateFileHandler()
           
 
Method Summary
static TuringState[] load(java.lang.String filename)
          Retreives an array of TuringStates created from the data in the file.
static boolean save(java.lang.String path, java.lang.String filename, TuringState[] states)
          Saves the states out to a file
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StateFileHandler

public StateFileHandler()
Method Detail

save

public static boolean save(java.lang.String path,
                           java.lang.String filename,
                           TuringState[] states)
Saves the states out to a file

Parameters:
path -
states -
Returns:
true if successful, false if not

load

public static TuringState[] load(java.lang.String filename)
                          throws java.lang.Exception
Retreives an array of TuringStates created from the data in the file. Creates TuringState objects and populates with instructions.

Parameters:
path -
Returns:
turingStates
Throws:
java.lang.Exception