aima.gui.applications
Class VacuumAppDemo.VacuumModel

java.lang.Object
  extended by aima.basic.BasicEnvironmentView
      extended by aima.gui.framework.AgentAppModel
          extended by aima.gui.applications.VacuumAppDemo.VacuumModel
Enclosing class:
VacuumAppDemo

protected static class VacuumAppDemo.VacuumModel
extends AgentAppModel

Provides access to the used environment, the names of the locations (squares) maintained by the environment, and the current state of all locations.


Nested Class Summary
 
Nested classes/interfaces inherited from class aima.gui.framework.AgentAppModel
AgentAppModel.ModelChangedListener
 
Field Summary
static java.lang.String DIRTY
           
 
Fields inherited from class aima.gui.framework.AgentAppModel
listeners
 
Constructor Summary
protected VacuumAppDemo.VacuumModel()
           
 
Method Summary
 Agent getAgent()
           
 TrivialVaccumEnvironment getEnv()
           
 java.util.List<java.lang.String> getLocations()
          Returns the names of all locations used.
 boolean hasAgent(java.lang.String location)
          Checks whether the agent is currently at the specified location.
 boolean isDirty(java.lang.String location)
          Checks whether the specified location is dirty.
 void setAgent(Agent agent)
           
 void setEnv(TrivialVaccumEnvironment env)
           
 
Methods inherited from class aima.gui.framework.AgentAppModel
addModelChangedListener, envChanged, fireModelChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DIRTY

public static java.lang.String DIRTY
Constructor Detail

VacuumAppDemo.VacuumModel

protected VacuumAppDemo.VacuumModel()
Method Detail

setEnv

public void setEnv(TrivialVaccumEnvironment env)

getEnv

public TrivialVaccumEnvironment getEnv()

setAgent

public void setAgent(Agent agent)

getAgent

public Agent getAgent()

getLocations

public java.util.List<java.lang.String> getLocations()
Returns the names of all locations used.


isDirty

public boolean isDirty(java.lang.String location)
Checks whether the specified location is dirty.


hasAgent

public boolean hasAgent(java.lang.String location)
Checks whether the agent is currently at the specified location.