simulation_BasicVersion
Class SimulationRunnable

java.lang.Object
  extended by simulation_BasicVersion.SimulationRunnable
All Implemented Interfaces:
java.lang.Runnable

public class SimulationRunnable
extends java.lang.Object
implements java.lang.Runnable

This class encapsulates a Runnable that has a basic simulation behaviour.

Author:
mb

Constructor Summary
SimulationRunnable()
          Creates a runnable simulation with the default frame rate of 20 frames per second.
SimulationRunnable(int frameRate)
          Creates a runnable simulation with the specified frame rate.
 
Method Summary
 void run()
          Causes this runnable to launch.
 void run(int frameRate)
          Causes this runnable to launch with the specified frame rate.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimulationRunnable

public SimulationRunnable()
Creates a runnable simulation with the default frame rate of 20 frames per second.


SimulationRunnable

public SimulationRunnable(int frameRate)
Creates a runnable simulation with the specified frame rate.

Parameters:
frameRate - as described above
Method Detail

run

public void run(int frameRate)
Causes this runnable to launch with the specified frame rate.

Parameters:
frameRate - as described above

run

public void run()
Causes this runnable to launch.

Specified by:
run in interface java.lang.Runnable