|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectvisidia.simulation.process.agent.AgentMover
public abstract class AgentMover
Abstract class providing different moving types for the agents. You should subclass this class to create your own style of move.
Constructor Summary | |
---|---|
AgentMover()
Instantiates a new agent mover. |
|
AgentMover(Agent ag)
Creates a new agent mover. |
Method Summary | |
---|---|
protected Agent |
agent()
Returns the agent associated to this mover. |
abstract int |
findNextDoor()
Returns the door to which the agent will go. |
java.lang.Boolean |
isOpenDoor(int door,
Vertex vertex)
Tests if the door is open, and if the vertex is accessible. |
void |
move()
Moves the agent to the next door. |
void |
move(int door)
Moves the agent to a specified door. |
void |
setAgent(Agent ag)
Sets the agent. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AgentMover()
public AgentMover(Agent ag)
ag
- agent associated to this mover.Method Detail |
---|
protected final Agent agent()
public void setAgent(Agent ag)
ag
- the new agentpublic void move() throws java.lang.InterruptedException, MoveException
java.lang.InterruptedException
- the interrupted exception
MoveException
- the move exceptionpublic final void move(int door) throws java.lang.InterruptedException
door
- Door to which move.
java.lang.InterruptedException
- the interrupted exceptionpublic abstract int findNextDoor() throws MoveException
MoveException
- the move exceptionpublic java.lang.Boolean isOpenDoor(int door, Vertex vertex)
door
- the doorvertex
- the vertex
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |