fr.ifremer.isisfish.simulator
Class SimulationPlanContext

java.lang.Object
  extended by fr.ifremer.isisfish.simulator.SimulationPlanContext
Direct Known Subclasses:
AnalysePlanContext

public class SimulationPlanContext
extends Object

Simulation plan context.java Replace old AnalysePlanContext.

Version:
$Revision: 3445 $ Last update: $Date: 2011-07-15 15:12:45 +0200 (Fri, 15 Jul 2011) $ by : $Author: chatellier $
Author:
poussin

Field Summary
protected  String id
          Simulation id.
protected  int number
          Simulation plan number.
protected  SimulationParameter param
          Simulation parameters.
protected  Map<String,Object> values
          Additional context values.
 
Constructor Summary
SimulationPlanContext(String id, SimulationParameter param)
           
 
Method Summary
 String getId()
          Get id.
 SimulationStorage getLastSimulation()
          Get last simulation storage.
 int getNumber()
          Deprecated. use nextSimulation.getParameter().getSimulationPlanNumber()
 SimulationParameter getParam()
          Get simulation parameters.
 SimulationStorage getSimulation(int number)
          Get SimulationStorage for specified simulation plan number.
 Object getValue(String key)
          Get plan context value.
 void incNumber()
          Must be call when new simulation is generated from plan.
 void setValue(String key, Object value)
          Set plan context value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

id

protected String id
Simulation id.


number

protected int number
Simulation plan number.


param

protected SimulationParameter param
Simulation parameters.


values

protected Map<String,Object> values
Additional context values.

Constructor Detail

SimulationPlanContext

public SimulationPlanContext(String id,
                             SimulationParameter param)
Method Detail

getId

public String getId()
Get id.

Returns:
the id

getNumber

public int getNumber()
Deprecated. use nextSimulation.getParameter().getSimulationPlanNumber()

Get current simulation plan simulation count. Warning, in after simulation, refer to generated simulation count, not ended simulation number. Depreciated, but no remove this method, it's just to not be used by user script.

Returns:
the number

incNumber

public void incNumber()
Must be call when new simulation is generated from plan.


getParam

public SimulationParameter getParam()
Get simulation parameters.

Returns:
simulation parameters

getValue

public Object getValue(String key)
Get plan context value. Used in script.

Parameters:
key - key
Returns:
value for key.

setValue

public void setValue(String key,
                     Object value)
Set plan context value. Used in script.

Parameters:
key - key
value - value

getLastSimulation

public SimulationStorage getLastSimulation()
Get last simulation storage. Used in script.

Returns:
last simulation storage

getSimulation

public SimulationStorage getSimulation(int number)
Get SimulationStorage for specified simulation plan number.

Parameters:
number - number
Returns:
SimulationStorage


Copyright © 1999-2012 CodeLutin. All Rights Reserved.