|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object fr.lip6.sma.simulacion.app.map.MapShapesModel
public class MapShapesModel
Classe pour gérer l'association des formes avec les agents. Cette association est locale pour chaque instance de l'application.
Field Summary | |
---|---|
private Map |
mMapAgentShape
Map agent names to shape IDs. |
private int |
mMaxShapeID
Last (max) shape ID. |
private BitSet |
mUsedShapeIDs
Set of used shape IDs. |
Constructor Summary | |
---|---|
MapShapesModel(int inMaxShapeID)
Constructor from the maximum number of shapes. |
Method Summary | |
---|---|
int |
addAgent(String inAgentName)
Create a new shape ID to the model on the arrival of an agent. |
int |
getAgentShapeID(String inAgentName)
Gets the shape id of an agent geometric avatar. |
void |
removeAgent(String inAgentName)
Method to remove a shape ID from the model on exit of the agent. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final Map mMapAgentShape
private final BitSet mUsedShapeIDs
private final int mMaxShapeID
Constructor Detail |
---|
public MapShapesModel(int inMaxShapeID)
inMaxShapeID
- maximum number of shapes.Method Detail |
---|
public int getAgentShapeID(String inAgentName)
inAgentName
- The agent name in the system.
public int addAgent(String inAgentName)
inAgentName
- the name of the agent.
public void removeAgent(String inAgentName)
inAgentName
- The name of the agent.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |