public abstract class AbstractCommand extends AbstractMessage implements Command
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractCommand(java.lang.Enum<?> urn)
Construct a new abstract command.
|
protected |
AbstractCommand(java.lang.Enum<?> urn,
EntityID agentID,
int time)
Construct a new abstract command.
|
protected |
AbstractCommand(java.lang.String urn)
Construct a new abstract command.
|
protected |
AbstractCommand(java.lang.String urn,
EntityID agentID,
int time)
Construct a new abstract command.
|
| Modifier and Type | Method and Description |
|---|---|
EntityID |
getAgentID()
Get the id of the agent-controlled entity that has issued this command.
|
int |
getTime()
Get the timestep this command is intended for.
|
protected void |
setAgentID(EntityID agentID)
Set the ID of the agent issuing the command.
|
protected void |
setTime(int time)
Set the time of the command.
|
addMessageComponent, getComponents, getURN, read, toString, writeprotected AbstractCommand(java.lang.String urn)
urn - The urn of the command.protected AbstractCommand(java.lang.String urn,
EntityID agentID,
int time)
urn - The urn of the command.agentID - The ID of the agent issuing the command.time - The time this command was issued.protected AbstractCommand(java.lang.Enum<?> urn)
urn - The urn of the command.protected AbstractCommand(java.lang.Enum<?> urn,
EntityID agentID,
int time)
urn - The urn of the command.agentID - The ID of the agent issuing the command.time - The time this command was issued.public EntityID getAgentID()
CommandgetAgentID in interface Commandpublic int getTime()
Commandprotected void setAgentID(EntityID agentID)
agentID - The new agent ID.protected void setTime(int time)
time - The new time.