|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfr.lifl.jedi.model.Environment.EnvironmentCell
public class Environment.EnvironmentCell
This inner class corresponds to an unitary cell of the environment.
This cell has two coordinates (x,y), that correspond to the position of its lower left corner in the environment.
A cell contains all positions of the environment contained in the set [x, x+1[ * [y, y+1[. Consequently, if the surface of an agent contains one point in [x, x+1[ * [y, y+1[, this agent is considered as contained in this cell.
JEDI V 2.2 |
Created the 30th oct. 2008 |
Modified the 4th may 2009 |
Yoann Kubera |
SMAC Team (Systèmes Multi-Agents et Comportement) |
LIFL (Laboratoire d'Informatique Fondamentale de Lille) |
University of Lille, France |
Field Summary | |
---|---|
protected Environment |
environment
The environment where this cell lies. |
protected java.awt.Point |
position
The coordinates of the cell in the environment. |
protected java.util.Set<Agent> |
theAgents
The set of all agents that are present in this cell. |
Constructor Summary | |
---|---|
Environment.EnvironmentCell(Environment e,
int x,
int y)
Constructor of the class EnvironmentCell. |
Method Summary | |
---|---|
void |
addAgent(Agent a)
Adds an agent to this cell. |
java.util.Set<Agent> |
getAgents()
Gets the set of all agents present in this cell. |
java.awt.Point |
getPosition()
Gets the coordinates of the lower left side of the cell in the environment. |
void |
removeAgent(Agent a)
Removes an agent from this cell. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.awt.Point position
protected Environment environment
protected java.util.Set<Agent> theAgents
Constructor Detail |
---|
public Environment.EnvironmentCell(Environment e, int x, int y)
e
- the environment where lies the cell.x
- the x coordinate of the lower
left part of the cell.y
- the y coordinate of the lower
left part of the cell.Method Detail |
---|
public java.util.Set<Agent> getAgents()
public void addAgent(Agent a)
a
- The agent to addpublic void removeAgent(Agent a)
a
- The agent to remove.public java.awt.Point getPosition()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |