appLogic
Class Simulation

java.lang.Object
  extended by appLogic.Simulation

public class Simulation
extends java.lang.Object

The Simulation contains the control elements for the hough transformation and the functionality behind them.


Constructor Summary
Simulation(java.util.List<Simulatable> simulatable)
          Standard constructor
 
Method Summary
 void configure(double speed)
          Configuration - sets the speed
 void configure(int nrOfUpdates, double speed)
          Configuration - sets the speed and the number of updates.
 int getNrOfUpdates()
          Returns the number of updates
 double getSpeed()
          Returns the speed
 int getTime()
          Returns the time
 boolean isPause()
          Return if the simulation is paused
 void pause()
          Stop the simulation
 void play()
          Starts the simulation
 void reset()
          Set the timer back to 0 and clear the simulation
 void step()
          Go one step forward
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Simulation

public Simulation(java.util.List<Simulatable> simulatable)
Standard constructor

Parameters:
simulatable -
Method Detail

configure

public void configure(int nrOfUpdates,
                      double speed)
Configuration - sets the speed and the number of updates.

Parameters:
nrOfUpdates -
speed -

configure

public void configure(double speed)
Configuration - sets the speed

Parameters:
speed -

getNrOfUpdates

public int getNrOfUpdates()
Returns the number of updates

Returns:
nrOfUpdates

play

public void play()
Starts the simulation


getTime

public int getTime()
Returns the time

Returns:
time

pause

public void pause()
Stop the simulation


reset

public void reset()
Set the timer back to 0 and clear the simulation


step

public void step()
Go one step forward


getSpeed

public double getSpeed()
Returns the speed

Returns:
speed

isPause

public boolean isPause()
Return if the simulation is paused

Returns:
true if the simulation is paused or false otherwise