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

Package class diagram package PlaceStructure
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.PlaceStructure

public class PlaceStructure
extends DefConCommand

Places a structure of a specified type to a specified location.


Constructor Summary
PlaceStructure(int typeId, DefConLocation location)
          Creates new instance of command PlaceStructure.
PlaceStructure(PlaceStructure original)
          Cloning constructor...
 
Method Summary
 DefConLocation getLocation()
          Target location of the structure.
 int getTypeId()
          Id of unit to set target of.
 void perform()
          Performs the command - to be used only by the DefConCommandExecutor.
 PlaceStructure setLocation(DefConLocation location)
          Target location of the structure.
 PlaceStructure setTypeId(int typeId)
          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

PlaceStructure

public PlaceStructure(int typeId,
                      DefConLocation location)
Creates new instance of command PlaceStructure. Places a structure of a specified type to a specified location.

Parameters:
typeId - Id of unit to set target of.
location - Target location of the structure.

PlaceStructure

public PlaceStructure(PlaceStructure original)
Cloning constructor...

Parameters:
original -
Method Detail

getTypeId

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

Returns:
int

setTypeId

public PlaceStructure setTypeId(int typeId)
Id of unit to set target of.

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

getLocation

public DefConLocation getLocation()
Target location of the structure.

Returns:
DefConLocation

setLocation

public PlaceStructure setLocation(DefConLocation location)
Target location of the structure.

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 © 2015 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.