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
Constructor Summary |
WorldAgent(String name)
Creates a new instance of WorldAgent |
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 |
WorldAgent
public WorldAgent(String name)
- Creates a new instance of WorldAgent
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'