net.bluebones.boggle
Class GameId

java.lang.Object
  extended by net.bluebones.boggle.GameId
All Implemented Interfaces:
Serializable

public class GameId
extends Object
implements Serializable

A universally unique identifier for a game of Boggle.

Version:
0.3 $Revision: 1.4 $
Author:
Thomas David Baker
See Also:
Serialized Form

Constructor Summary
GameId(String serverAddress, UID uid)
          Initializes a new GameId.
 
Method Summary
 boolean equals(Object o)
          Determines if this GameId is the same as the Object specified.
 int hashCode()
          Returns a hash code value for the object.
 String serverAddress()
          Gets the host IP or other address.
 String toString()
          Gets a String representation of this GameId.
 UID uid()
          Gets the game identifier.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GameId

public GameId(String serverAddress,
              UID uid)
Initializes a new GameId.

Parameters:
serverAddress - String IP or other address of host.
uid - UID game identifier.
Method Detail

serverAddress

public String serverAddress()
Gets the host IP or other address.

Returns:
String of host IP or other address.

uid

public UID uid()
Gets the game identifier.

Returns:
UID game identifier.

equals

public boolean equals(Object o)
Determines if this GameId is the same as the Object specified.

Overrides:
equals in class Object
Parameters:
o - Object to compare with.

hashCode

public int hashCode()
Returns a hash code value for the object. This method is supported for the benefit of hashtables such as those provided by java.util.Hashtable.

Overrides:
hashCode in class Object
Returns:
int hash code value for this object.

toString

public String toString()
Gets a String representation of this GameId.

Overrides:
toString in class Object
Returns:
String representation.