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.
 int printing
          If 1 many objects print data on the terminal window.
 
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.
 void setPrinting(int p)
          To set the value of option printing.
 
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.


printing

public int printing
If 1 many objects print data on the terminal window.

Constructor Detail

CurrentAgent

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

Method Detail

setPrinting

public void setPrinting(int p)
To set the value of option printing.


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.