Generic Environment GUI Class Library

Class EnvAppController

java.lang.Object
  |
  +--EnvAppController

public abstract class EnvAppController
extends java.lang.Object

Environment-Based Applications:
An EnvAppController controls the running of an environment application.

Version:
1 December 2002

Field Summary
protected  Environment env
           
 
Constructor Summary
EnvAppController()
           
 
Method Summary
 boolean hasReachedStoppingState()
          Determines whether a running application has reached a desired stopping state.
 void restart()
          Re-initializes the state of the environment application for a restart.
 void setEnv(Environment environment)
          Sets the application's environment.
abstract  void step()
          Advances the simulation one step.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

env

protected Environment env
Constructor Detail

EnvAppController

public EnvAppController()
Method Detail

setEnv

public void setEnv(Environment environment)
Sets the application's environment. (Precondition: env is not null.)
Parameters:
environment - the Environment to act on

step

public abstract void step()
Advances the simulation one step.

hasReachedStoppingState

public boolean hasReachedStoppingState()
Determines whether a running application has reached a desired stopping state. Examples include whether the mouse in a maze has found the cheese, whether the first (or last) competitor in a race has finished, or whether a chemical reaction has reached equilibrium.

restart

public void restart()
Re-initializes the state of the environment application for a restart.

Generic Environment GUI Class Library

Copyright© 2003 Alyce Brady