cz.cuni.amis.pogamut.defcon.communication.messages.commands
Class SetMovementTarget

Package class diagram package SetMovementTarget
java.lang.Object
  extended by cz.cuni.amis.pogamut.base.communication.messages.CommandMessage
      extended by cz.cuni.amis.pogamut.defcon.communication.messages.commands.DefConCommand
          extended by cz.cuni.amis.pogamut.defcon.communication.messages.commands.SetMovementTarget

public class SetMovementTarget
extends DefConCommand

Sets movement target of the unit.


Constructor Summary
SetMovementTarget(int unitId, DefConLocation location)
          Creates new instance of command SetMovementTarget.
SetMovementTarget(SetMovementTarget original)
          Cloning constructor...
 
Method Summary
 DefConLocation getLocation()
          Movement target.
 int getUnitId()
          Id of unit to set target of.
 void perform()
          Performs the command - to be used only by the DefConCommandExecutor.
 SetMovementTarget setLocation(DefConLocation location)
          Movement target.
 SetMovementTarget setUnitId(int unitId)
          Id of unit to set target of.
 String toHtmlString()
          Returns message in html format.
 String toString()
          Returns human readable serialization of the message.
 
Methods inherited from class cz.cuni.amis.pogamut.defcon.communication.messages.commands.DefConCommand
getStringizedFields, toMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SetMovementTarget

public SetMovementTarget(int unitId,
                         DefConLocation location)
Creates new instance of command SetMovementTarget. Sets movement target of the unit.

Parameters:
unitId - Id of unit to set target of.
location - Movement target.

SetMovementTarget

public SetMovementTarget(SetMovementTarget original)
Cloning constructor...

Parameters:
original -
Method Detail

getUnitId

public int getUnitId()
Id of unit to set target of.

Returns:
int

setUnitId

public SetMovementTarget setUnitId(int unitId)
Id of unit to set target of.

Parameters:
unitId -
Returns:
this object, allows you to chain setters

getLocation

public DefConLocation getLocation()
Movement target.

Returns:
DefConLocation

setLocation

public SetMovementTarget setLocation(DefConLocation location)
Movement target.

Parameters:
location -
Returns:
this object, allows you to chain setters

perform

public void perform()
Performs the command - to be used only by the DefConCommandExecutor.

Specified by:
perform in class DefConCommand

toString

public String toString()
Returns human readable serialization of the message.

Overrides:
toString in class CommandMessage
Returns:
human readable string

toHtmlString

public String toHtmlString()
Returns message in html format.

Returns:
html message


Copyright © 2014 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.