jfreerails.world.player
Class PlayerPrincipal
java.lang.Object
jfreerails.world.player.FreerailsPrincipal
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
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
id
private final int id
name
private final java.lang.String name
PlayerPrincipal
public PlayerPrincipal(int id,
java.lang.String name)
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