org.mrd.repast.landscape
Class LandscapeAgent

java.lang.Object
  |
  +--org.mrd.repast.landscape.LandscapeAgent
All Implemented Interfaces:
uchicago.src.sim.gui.Drawable, uchicago.src.sim.engine.Stepable

public abstract class LandscapeAgent
extends java.lang.Object
implements uchicago.src.sim.engine.Stepable, uchicago.src.sim.gui.Drawable

Used to supply "standard" methods to Agents that use the Landscape object.

Author:
Mark Diggory

Field Summary
static int ALIVE
          Constant representing an alive LandscapeAgent in the model.
static int DEAD
          Constant representing a dead LandscapeAgent in the landscape.
protected  Landscape landscape
          Holds value of property landscape.
protected  int stage
          Holds value of property stage.
protected  int x
          Holds value of property x (the agents location).
protected  int y
          Holds value of property y (the agents location).
 
Constructor Summary
LandscapeAgent(Landscape landscape)
           
 
Method Summary
abstract  void draw(uchicago.src.sim.gui.SimGraphics g)
          Abstract draw() method must be overridden in Agents that extend this class
 int getStage()
          Getter for property stage.
 int getX()
          Getter for property x.
 int getY()
          Getter for property y.
 void setStage(int stage)
          Setter for property stage.
 void setX(int x)
          Setter for property x.
 void setY(int y)
          Setter for property y.
abstract  void step()
          Abstract step() method must be overridden in Agents that extend this class
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALIVE

public static final int ALIVE
Constant representing an alive LandscapeAgent in the model. Is used to identify live agents on the landscape

See Also:
Constant Field Values

DEAD

public static final int DEAD
Constant representing a dead LandscapeAgent in the landscape. Is used to reap dead agents from the landscape

See Also:
Constant Field Values

x

protected int x
Holds value of property x (the agents location).


y

protected int y
Holds value of property y (the agents location).


stage

protected int stage
Holds value of property stage.


landscape

protected Landscape landscape
Holds value of property landscape.

Constructor Detail

LandscapeAgent

public LandscapeAgent(Landscape landscape)
Method Detail

step

public abstract void step()
Abstract step() method must be overridden in Agents that extend this class

Specified by:
step in interface uchicago.src.sim.engine.Stepable

draw

public abstract void draw(uchicago.src.sim.gui.SimGraphics g)
Abstract draw() method must be overridden in Agents that extend this class

Specified by:
draw in interface uchicago.src.sim.gui.Drawable
Parameters:
g - graphics object to draw this in.

setStage

public void setStage(int stage)
Setter for property stage.

Parameters:
stage - New value of property stage.

getStage

public int getStage()
Getter for property stage.

Returns:
Value of property stage.

getX

public int getX()
Getter for property x.

Specified by:
getX in interface uchicago.src.sim.gui.Drawable
Returns:
Value of property x.

getY

public int getY()
Getter for property y.

Specified by:
getY in interface uchicago.src.sim.gui.Drawable
Returns:
Value of property y.

setX

public void setX(int x)
Setter for property x.

Parameters:
x - New value of property x.

setY

public void setY(int y)
Setter for property y.

Parameters:
y - New value of property y.


Copyright © 2000-2003 Mark Robert Diggory. All Rights Reserved.