Class CurrentAgent

java.lang.Object
  extended bySwarmObjectImpl
      extended byCurrentAgent

public class CurrentAgent
extends SwarmObjectImpl

This is a ghost agent which simply transfers the 'act' message to the first agent in the list agentList and rotate it this trick is necessary to send the act message agentNumber times; so the observer can dispaly the price of each acting step.

Author:
Marco Agagliate
See Also:
Serialized Form

Field Summary
(package private)  ListImpl agentList
          This is the agent list.
 
Constructor Summary
CurrentAgent(Zone aZone)
          Constructor for a new CurrentAgent.
 
Method Summary
 void act1()
          The method calls the act1 method from an agent, which is in a list.
 void setAgentList(ListImpl l)
          The method sets agentList.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

agentList

ListImpl agentList
This is the agent list.

Constructor Detail

CurrentAgent

public CurrentAgent(Zone aZone)
Constructor for a new CurrentAgent.

Method Detail

setAgentList

public void setAgentList(ListImpl l)
The method sets agentList.


act1

public void act1()
The method calls the act1 method from an agent, which is in a list.