|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.mrd.repast.landscape.LandscapeAgent
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(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 |
public static final int ALIVE
public static final int DEAD
protected int x
protected int y
protected int stage
protected Landscape landscape
Constructor Detail |
public LandscapeAgent(Landscape landscape)
Method Detail |
public abstract void step()
step
in interface uchicago.src.sim.engine.Stepable
public abstract void draw(uchicago.src.sim.gui.SimGraphics g)
draw
in interface uchicago.src.sim.gui.Drawable
g
- graphics object to draw this in.public void setStage(int stage)
stage
- New value of property stage.public int getStage()
public int getX()
getX
in interface uchicago.src.sim.gui.Drawable
public int getY()
getY
in interface uchicago.src.sim.gui.Drawable
public void setX(int x)
x
- New value of property x.public void setY(int y)
y
- New value of property y.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |