elge.world
Class WorldAgent

java.lang.Object
  |
  +--elge.agent.Agent
        |
        +--elge.agent.AgentContainer
              |
              +--elge.world.WorldAgent
All Implemented Interfaces:
MoveableAgent
Direct Known Subclasses:
AbstractGenerator, SimpleAgent

public class WorldAgent
extends AgentContainer
implements MoveableAgent

Well WorldAgent is the class, that should be derived for future agents!!

Author:
Palino

Field Summary
 
Fields inherited from class elge.agent.AgentContainer
agents, innerAgency
 
Fields inherited from class elge.agent.Agent
actualSituation, agency, agencyClass, agentClassCounter, id, name, registered
 
Fields inherited from interface elge.world.MoveableAgent
PROP_POSITION
 
Constructor Summary
WorldAgent(String name)
          Creates a new instance of WorldAgent
 
Method Summary
 void addVetoableChangeListener(VetoableChangeListener l)
           
 String getFullName()
          This method should be used to fully identify the agent in the system.
 boolean getGenerated()
           
 String getGroup()
           
 boolean getHidden()
           
 Point getPosition()
          returns the position of the agent
 boolean isGenerator()
           
 void paint(Graphics gfx)
           
 void removeVetoableChangeListener(VetoableChangeListener l)
           
 void setGenerated(boolean gen)
           
 void setGroup(String grp)
           
 void setHidden(boolean hide)
          If the agent is hidden in the system.
 void setPosition(Point pt)
          sets the position of the agent
 
Methods inherited from class elge.agent.AgentContainer
add, add, add, agentsLife, del, getAgentCount, getAgents, life, setAgents
 
Methods inherited from class elge.agent.Agent
ask, ask, ask, createDefaultAgency, createUniqueID, getAgency, getID, getName, chooseAction, init, life, memorize, restart, sense, setAgency, setAgency, setAgency, setID, setName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WorldAgent

public WorldAgent(String name)
Creates a new instance of WorldAgent

Method Detail

addVetoableChangeListener

public void addVetoableChangeListener(VetoableChangeListener l)
Specified by:
addVetoableChangeListener in interface MoveableAgent

removeVetoableChangeListener

public void removeVetoableChangeListener(VetoableChangeListener l)
Specified by:
removeVetoableChangeListener in interface MoveableAgent

setHidden

public void setHidden(boolean hide)
If the agent is hidden in the system. For generators, or things like this. This option should not be changed during simulation.


getHidden

public boolean getHidden()

setGenerated

public void setGenerated(boolean gen)

getGenerated

public boolean getGenerated()

setPosition

public void setPosition(Point pt)
                 throws PropertyVetoException
Description copied from interface: MoveableAgent
sets the position of the agent

Specified by:
setPosition in interface MoveableAgent
PropertyVetoException

getPosition

public Point getPosition()
Description copied from interface: MoveableAgent
returns the position of the agent

Specified by:
getPosition in interface MoveableAgent

isGenerator

public boolean isGenerator()

paint

public void paint(Graphics gfx)

setGroup

public void setGroup(String grp)

getGroup

public String getGroup()

getFullName

public String getFullName()
Description copied from class: Agent
This method should be used to fully identify the agent in the system.

Overrides:
getFullName in class Agent
Returns:
returns full name of the agent which for agent class is 'name.id'