Interface SimulationWriter<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:
BinarySimulationWriter
public interface SimulationWriter<U extends java.io.Serializable,I extends java.io.Serializable,P>
Interface for writing a simulation into a file.
-
Method Summary
Modifier and Type Method Description booleanclose()Closes the writing objects.booleaninitialize(java.lang.String file)Initializes the simulation writing.booleanwriteIteration(Simulation<U,I,P> simulation, int numIter)Writes a single iteration in a file.booleanwriteSimulation(Simulation<U,I,P> simulation)Writes a whole simulation in 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.
-
writeSimulation
Writes a whole simulation in a file.- Parameters:
simulation- the simulation.- Returns:
- true if everything went OK, false if something failed while writing.
-
writeIteration
Writes a single iteration in a file.- Parameters:
simulation- the simulation.numIter- the iteration number.- 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.
-