com.asdf.client
Class User

java.lang.Object
  extended by com.asdf.client.User

public class User
extends java.lang.Object

Class User is used in lobby to keep information about user. Keeps information about user whether he is logged in or out. It can be used to restrict features in LobbyView.

Author:
louhio

Constructor Summary
User()
           
 
Method Summary
 double getBalance()
          Gets the balance of the user.
 java.lang.String getName()
          Returns the name of the account.
 AccountType getType()
          Returns the type of this users account.
 boolean isLogged()
          Checks if user is logged in or out.
 void setLogged(java.lang.String name, double balance, AccountType type)
          Sets user logged in.
 void setLoggedOut()
          Sets user logged out.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

User

public User()
Method Detail

setLogged

public void setLogged(java.lang.String name,
                      double balance,
                      AccountType type)
Sets user logged in.

Parameters:
name - Account name.
balance - Balance of account.
type - Type of account. See AccountTypes enumeration for details.

setLoggedOut

public void setLoggedOut()
Sets user logged out.


getType

public AccountType getType()
Returns the type of this users account.

Returns:
AccountType. See AccountType enumeration for details.

isLogged

public boolean isLogged()
Checks if user is logged in or out.

Returns:
True if user is logged in, false if user is logged out.

getName

public java.lang.String getName()
Returns the name of the account.

Returns:
Name of the account.

getBalance

public double getBalance()
Gets the balance of the user.

Returns:
Balance of the account.