jfreerails.network
Class SetWorldMessage2Client

java.lang.Object
  extended by jfreerails.network.SetWorldMessage2Client
All Implemented Interfaces:
java.io.Serializable, Message2Client, FreerailsSerializable

public class SetWorldMessage2Client
extends java.lang.Object
implements Message2Client

Sent from the server to the client when (i) a new game is started, (ii) a game is loaded, or (iii) the client connects to a game in progress.

Author:
Luke
See Also:
Serialized Form

Field Summary
private  int id
           
private static long serialVersionUID
           
private  World world
           
 
Constructor Summary
SetWorldMessage2Client(int id, World world)
          Note, makes a defensive copy of the world object passed to it.
 
Method Summary
 boolean equals(java.lang.Object o)
           
 MessageStatus execute(ClientControlInterface client)
          Executes this command on the specified ClientControlInterface.
 int getID()
          Returns the id of this command.
 int hashCode()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

id

private final int id

world

private final World world
Constructor Detail

SetWorldMessage2Client

public SetWorldMessage2Client(int id,
                              World world)
Note, makes a defensive copy of the world object passed to it.

Method Detail

execute

public MessageStatus execute(ClientControlInterface client)
Description copied from interface: Message2Client
Executes this command on the specified ClientControlInterface.

Specified by:
execute in interface Message2Client

getID

public int getID()
Description copied from interface: Message2Client
Returns the id of this command.

Specified by:
getID in interface Message2Client

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object