Class FWSimulationEvent<T>

java.lang.Object
net.simplace.sim.event.FWSimulationEvent<T>
Type Parameters:
T - type of the source object
Direct Known Subclasses:
FWSimulationErrorEvent

public class FWSimulationEvent<T> extends Object
Event of a session run, passed to the FWSimulationListeners: start and end of a simulation (source FWSimModel), end of a project (source FWSimProject) or end of an iteration (source FWSimulationControlCache), with the progress in percent. FWSimulationErrorEvent extends this class with the exception.
Author:
Andreas Enders
  • Constructor Details

    • FWSimulationEvent

      public FWSimulationEvent(T aSourceObject, Integer aPercentage)
      Parameters:
      aSourceObject - the source: model, project or control cache
      aPercentage - progress in percent, may be null
  • Method Details

    • isSimulationEvent

      public boolean isSimulationEvent()
      Returns:
      true if the source is a model (simulation)
    • isProjectEvent

      public boolean isProjectEvent()
      Returns:
      true if the source is a project
    • isIterationEvent

      public boolean isIterationEvent()
      Returns:
      true if the source is the control cache (iteration)
    • getPercentage

      public int getPercentage()
      Returns:
      the progress in percent, 0 for events without percentage (error events)
    • getModel

      public FWSimModel getModel()
      Returns:
      the model, or null if the source is no model
    • getProject

      public FWSimProject getProject()
      Returns:
      the project, or null if the source is no project
    • getControlCache

      public FWSimulationControlCache getControlCache()
      Returns:
      the control cache, or null if the source is no control cache