|
||||||||||
| 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()
PlayerReturns the User object associated with this player.
getUser in interface Playerpublic void setGame(Game game)
PlayerSet 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 Playerpublic Game getGame()
PlayerReturns the Game this player is participating in.
getGame in interface Playerpublic void setTeam(Team team)
PlayerSet the team that this player is a member of, or null if this player is not a member of a team.
setTeam in interface Playerpublic Team getTeam()
PlayerReturn the player's team, or null if the player is not a member of a team.
getTeam in interface Playerpublic int getHandicap()
PlayerReturns the handicap setting for this player. The way this is used depends on the game the player is participating in.
getHandicap in interface Playerpublic DartsSet getDartsSet()
PlayerReturns the set of darts used by the player.
getDartsSet in interface Playerpublic java.lang.String toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||