|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A user participating in a game.
A player is possibly a member of a Team.
A player uses a particular set of darts and can also have a handicap setting.
Player objects have reference semantics. Each Player object models a single participation of a User in a Game.
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. |
Methods inherited from interface org.dartra.framework.Persistent |
getId, setId |
Method Detail |
public User getUser()
Returns the User object associated with this player.
public void setGame(Game game)
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.
public Game getGame()
Returns the Game this player is participating in.
public 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.
public Team getTeam()
Return the player's team, or null if the player is not a member of a team.
public int getHandicap()
Returns the handicap setting for this player. The way this is used depends on the game the player is participating in.
public DartsSet getDartsSet()
Returns the set of darts used by the player.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |