Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.mrd.repast.landscape
Class LandscapeAgent  view LandscapeAgent download LandscapeAgent.java

java.lang.Object
  extended byorg.mrd.repast.landscape.LandscapeAgent

public abstract class LandscapeAgent
extends java.lang.Object

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


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(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


draw

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


setStage

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


getStage

public int getStage()
Getter for property stage.


getX

public int getX()
Getter for property x.


getY

public int getY()
Getter for property y.


setX

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


setY

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