|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.asdf.server.Account
public class Account
Stores account details like name and type. List of associated sessions is also stored.
Field Summary | |
---|---|
Statistics |
scores
|
Constructor Summary | |
---|---|
Account(java.lang.String name,
AccountType type)
Constructor. |
Method Summary | |
---|---|
double |
getBalance()
|
java.lang.String |
getName()
Getter for account name |
Game |
getSession(java.lang.Long id)
Getter for game instance. |
AccountType |
getType()
Return the type of the user |
void |
insertSession(Game game)
Creates a new session for this account. |
boolean |
insertSession(java.lang.Long id,
Game game)
Creates a new session for this account |
void |
removeSession(java.lang.Long id)
Removes a session from the account. |
void |
setBalance(double balance)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public Statistics scores
Constructor Detail |
---|
public Account(java.lang.String name, AccountType type)
name
- Account nameMethod Detail |
---|
public java.lang.String getName()
public AccountType getType()
public boolean insertSession(java.lang.Long id, Game game)
id
- Session IDgame
- Game with which this session is associated with
public void insertSession(Game game)
game
- Game with which this session is associated withpublic void removeSession(java.lang.Long id)
id
- ID of the session to be removed.public Game getSession(java.lang.Long id)
id
- Session ID associated with the game that we want to get.
public double getBalance()
public void setBalance(double balance)
balance
- the balance to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |