eos.agent
Class Agent

java.lang.Object
  extended by eos.agent.Agent
Direct Known Subclasses:
Firm, Laborer

public abstract class Agent
extends java.lang.Object

Parent class of all agents


Constructor Summary
Agent()
          Create a new agent
 
Method Summary
abstract  void act()
          Called by Economy.step() in each simulation step.
protected  void die()
          Make the agent die.
abstract  Good getGood(java.lang.String goodName)
          Return a reference to a good given goodName
 int getID()
          Return the ID of the agent
 java.lang.String getName()
          Return the class name of the agent
 boolean isAlive()
          Is the agent alive?
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Agent

public Agent()
Create a new agent

Method Detail

getGood

public abstract Good getGood(java.lang.String goodName)
Return a reference to a good given goodName

Parameters:
goodName -
Returns:
a reference to a good given goodName

getID

public final int getID()
Return the ID of the agent

Returns:
the ID of the agent

isAlive

public final boolean isAlive()
Is the agent alive?

Returns:
whether the agent is alive

getName

public final java.lang.String getName()
Return the class name of the agent

Returns:
the class name of the agent

die

protected void die()
Make the agent die.


act

public abstract void act()
Called by Economy.step() in each simulation step.