jfreerails.world.player
Class PlayerPrincipal

java.lang.Object
  extended by jfreerails.world.player.FreerailsPrincipal
      extended by jfreerails.world.player.PlayerPrincipal
All Implemented Interfaces:
java.io.Serializable, java.security.Principal, FreerailsSerializable

public class PlayerPrincipal
extends FreerailsPrincipal

FreerailsPrincipal that is a player in the game.

Author:
rob
See Also:
Serialized Form

Field Summary
private  int id
           
private  java.lang.String name
           
private static long serialVersionUID
           
 
Constructor Summary
PlayerPrincipal(int id, java.lang.String name)
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
 int getId()
           
 java.lang.String getName()
           
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

id

private final int id

name

private final java.lang.String name
Constructor Detail

PlayerPrincipal

public PlayerPrincipal(int id,
                       java.lang.String name)
Method Detail

getName

public java.lang.String getName()

hashCode

public int hashCode()
Specified by:
hashCode in interface java.security.Principal
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Specified by:
toString in interface java.security.Principal
Overrides:
toString in class java.lang.Object

getId

public int getId()
Returns:
an integer unique to this PlayerPrincipal

equals

public boolean equals(java.lang.Object o)
Specified by:
equals in interface java.security.Principal
Overrides:
equals in class java.lang.Object