net.bluebones.boggle
Class NamedClient

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

public class NamedClient
extends Object
implements Serializable

Wraps an IClient with other non-remote details about that client.

Version:
0.3 $Revision: 1.3 $
Author:
Thomas David Baker, bakert@gmail.com
See Also:
Serialized Form

Constructor Summary
NamedClient(String name, IClient client)
          Initializes a new NamedClient.
 
Method Summary
 IClient client()
          IClient that is wrapped in this NamedClient.
 boolean equals(Object o)
          Determines if o is the same as this NamedClient (has the same name and wraps the exact same client).
 int hashCode()
          Returns a hash code value for the object.
 String name()
          Name of this NamedClient.
 String toString()
          Gets a String representation of this object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NamedClient

public NamedClient(String name,
                   IClient client)
Initializes a new NamedClient.

Parameters:
name - String name of the client (to use in display).
client - Underlying IClient that does the work.
Method Detail

name

public String name()
Name of this NamedClient.

Returns:
String name.

client

public IClient client()
IClient that is wrapped in this NamedClient.

Returns:
IClient.

toString

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

Overrides:
toString in class Object
Returns:
String representation of this object.

equals

public boolean equals(Object o)
Determines if o is the same as this NamedClient (has the same name and wraps the exact same client).

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

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.