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

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

public class PlaceFleet
extends DefConCommand

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


Constructor Summary
PlaceFleet(DefConLocation location, UnitType[] ships)
          Creates new instance of command PlaceFleet.
PlaceFleet(PlaceFleet original)
          Cloning constructor...
 
Method Summary
 DefConLocation getLocation()
          Target location of the new fleet.
 UnitType[] getShips()
          List of ships to create.
 void perform()
          Performs the command - to be used only by the DefConCommandExecutor.
 PlaceFleet setLocation(DefConLocation location)
          Target location of the new fleet.
 PlaceFleet setShips(UnitType[] ships)
          List of ships to create.
 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

PlaceFleet

public PlaceFleet(DefConLocation location,
                  UnitType[] ships)
Creates new instance of command PlaceFleet. Places a fleet of a specified type to a specified location.

Parameters:
location - Target location of the new fleet.
ships - List of ships to create.

PlaceFleet

public PlaceFleet(PlaceFleet original)
Cloning constructor...

Parameters:
original -
Method Detail

getLocation

public DefConLocation getLocation()
Target location of the new fleet.

Returns:
DefConLocation

setLocation

public PlaceFleet setLocation(DefConLocation location)
Target location of the new fleet.

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

getShips

public UnitType[] getShips()
List of ships to create.

Returns:
UnitType[]

setShips

public PlaceFleet setShips(UnitType[] ships)
List of ships to create.

Parameters:
ships -
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 cz.cuni.amis.pogamut.base.communication.messages.CommandMessage
Returns:
human readable string

toHtmlString

public String toHtmlString()
Returns message in html format.

Returns:
html message


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