Interface SimulationReader<U extends java.io.Serializable,​I extends java.io.Serializable,​P>

Type Parameters:
U - type of the users.
I - type of the information pieces.
P - type of the parameters.
All Known Implementing Classes:
BinarySimulationReader

public interface SimulationReader<U extends java.io.Serializable,​I extends java.io.Serializable,​P>
Interface for reading a simulation from a file.
  • Method Summary

    Modifier and Type Method Description
    boolean close()
    Closes the writing objects.
    boolean initialize​(java.lang.String file)
    Initializes the simulation writing.
    Iteration<U,​I,​P> readIteration​(Data<U,​I,​P> data)
    Writes a single iteration in a file.
    Simulation<U,​I,​P> readSimulation​(Data<U,​I,​P> data)
    Reads a simulation from a file.
  • Method Details

    • initialize

      boolean initialize​(java.lang.String file)
      Initializes the simulation writing.
      Parameters:
      file - the name of the file where we want to store the simulation.
      Returns:
      true if everything went OK, false if something failed while configuring the writer.
    • readSimulation

      Simulation<U,​I,​P> readSimulation​(Data<U,​I,​P> data)
      Reads a simulation from a file.
      Parameters:
      data - the simulation data.
      Returns:
      the simulation if everything went OK, null if not.
    • readIteration

      Iteration<U,​I,​P> readIteration​(Data<U,​I,​P> data)
      Writes a single iteration in a file.
      Parameters:
      data - the simulation data.
      Returns:
      true if everything went OK, false if something failed while writing.
    • close

      boolean close()
      Closes the writing objects.
      Returns:
      true if everything went OK, false if something failed while deconfiguring the writer.