com.speckled.specksim
Interface Environment

All Known Implementing Classes:
GravityEnvironment, TemperatureEnvironment

public interface Environment

This interface should be implemented in order to define some aspect of the network's environment. Environment objects can be made Configurable and an appropriate gui will be generated.

Author:
ryanm

Method Summary
 java.lang.String getName()
          Gets a name for this Environment object
 SerializableState getState()
          This method should be implemented to produce an object that will be placed into the SimulatorState object that is passed to the GUI.
 void init(SpeckSim simulator)
          Called whenever the simulator is reset
 

Method Detail

getName

java.lang.String getName()
Gets a name for this Environment object

Returns:
A name

init

void init(SpeckSim simulator)
Called whenever the simulator is reset

Parameters:
simulator - The simulator that owns this environment object

getState

SerializableState getState()
This method should be implemented to produce an object that will be placed into the SimulatorState object that is passed to the GUI. Any data that you want to visualise, generate statistics on, etc, should be produced here. The implementation should not assume that init() has been called, and should always return an instance if possible. Pass null if there is no interesting data

Returns:
The interesting state of the Environment, or null if no data is required