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

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

public class RequestAlliance
extends DefConCommand

Requests an alliance from a player.


Constructor Summary
RequestAlliance(int teamId)
          Creates new instance of command RequestAlliance.
RequestAlliance(RequestAlliance original)
          Cloning constructor...
 
Method Summary
 int getTeamId()
          Id of team to ally with.
 void perform()
          Performs the command - to be used only by the DefConCommandExecutor.
 RequestAlliance setTeamId(int teamId)
          Id of team to ally with.
 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

RequestAlliance

public RequestAlliance(int teamId)
Creates new instance of command RequestAlliance. Requests an alliance from a player.

Parameters:
teamId - Id of team to ally with.

RequestAlliance

public RequestAlliance(RequestAlliance original)
Cloning constructor...

Parameters:
original -
Method Detail

getTeamId

public int getTeamId()
Id of team to ally with.

Returns:
int

setTeamId

public RequestAlliance setTeamId(int teamId)
Id of team to ally with.

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