|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.dartra.standard.PersistentObject
org.dartra.standard.StandardPlayer
Standard implementation of the Player interface.
Constructor Summary | |
StandardPlayer(User user,
int handicap,
DartsSet dartsSet)
|
Method Summary | |
DartsSet |
getDartsSet()
Returns the set of darts used by the player. |
Game |
getGame()
Returns the Game this player is participating in. |
int |
getHandicap()
Returns the handicap setting for this player. |
Team |
getTeam()
Return the player's team, or null if the player is not a member of a team. |
User |
getUser()
Returns the User object associated with this player. |
void |
setGame(Game game)
Set the game this user is participating in. |
void |
setTeam(Team team)
Set the team that this player is a member of, or null if this player is not a member of a team. |
java.lang.String |
toString()
|
Methods inherited from class org.dartra.standard.PersistentObject |
getId, setId |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.dartra.framework.Persistent |
getId, setId |
Constructor Detail |
public StandardPlayer(User user, int handicap, DartsSet dartsSet)
Method Detail |
public User getUser()
Player
Returns the User object associated with this player.
getUser
in interface Player
public void setGame(Game game)
Player
Set the game this user is participating in.
Implementations should make sure that it is not possible to change the game a user is participating in! This is particularly imporant for matches. The player will participate first and foremost in the match. He or she will also play the games of that match. However, that should have no impact on the game the player is linked with, which will be the match itself.
setGame
in interface Player
public Game getGame()
Player
Returns the Game this player is participating in.
getGame
in interface Player
public void setTeam(Team team)
Player
Set the team that this player is a member of, or null if this player is not a member of a team.
setTeam
in interface Player
public Team getTeam()
Player
Return the player's team, or null if the player is not a member of a team.
getTeam
in interface Player
public int getHandicap()
Player
Returns the handicap setting for this player. The way this is used depends on the game the player is participating in.
getHandicap
in interface Player
public DartsSet getDartsSet()
Player
Returns the set of darts used by the player.
getDartsSet
in interface Player
public java.lang.String toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |