Package org.kigalisim.engine.serializer
Class EngineResultSerializer
java.lang.Object
org.kigalisim.engine.serializer.EngineResultSerializer
Decorator around an engine to serialize out results.
This class wraps an Engine instance and provides methods to extract structured results for specific simulation parameters.
-
Constructor Summary
ConstructorsConstructorDescriptionEngineResultSerializer(Engine engine, ConverterStateGetter stateGetter) Create a new decorator to produce engine result snapshots. -
Method Summary
Modifier and TypeMethodDescriptionSerialize the results for an application and substance in a given year.
-
Constructor Details
-
EngineResultSerializer
Create a new decorator to produce engine result snapshots.- Parameters:
engine- The engine from which results will be serializedstateGetter- State getter by which to access values at the current state that the engine is focusing on. This will not be modified, only read.
-
-
Method Details
-
getResult
Serialize the results for an application and substance in a given year.- Parameters:
useKey- The UseKey containing application and substance informationyear- The year for which a result should be serialized- Returns:
- Snapshot of the result in the current engine state for the given application and substance
-