|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.ObjectDrinkUser
A class to store drink user information. This class is simply just a storage class with accessors and mutators, nothing more.
| Field Summary | |
private boolean |
admin
Whether or not the user is an administrator. |
private int |
balance
The balance of credits the user has on their account. |
private String |
password
The user's password. |
private String |
username
The username of the user. |
| Constructor Summary | |
DrinkUser(String inUsername,
String inPassword,
int inBalance,
boolean inAdmin)
Construct the Drink user. |
|
| Method Summary | |
boolean |
getAdmin()
Returns the user's admin status. |
int |
getBalance()
Returns the user's balance. |
String |
getPassword()
Returns the user's password. |
String |
getUsername()
Returns the user's username. |
int |
hashCode()
Returns a hashcode of the username stored in this DrinkUser. |
void |
setAdmin(boolean inAdmin)
Changes the user's admin status |
void |
setBalance(int inBalance)
Changes the user's balance. |
void |
setPassword(String inPassword)
Changes the user's password. |
void |
setUsername(String inUsername)
Sets the username belonging to this DrinkUser. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private String username
private String password
private int balance
private boolean admin
| Constructor Detail |
public DrinkUser(String inUsername,
String inPassword,
int inBalance,
boolean inAdmin)
inUsername - The username of the user.inPassword - The user's password.inBalance - The number of credits the user has on their account.inAdmin - The admin status of the user.| Method Detail |
public String getUsername()
public String getPassword()
public int getBalance()
public boolean getAdmin()
public void setUsername(String inUsername)
inUsername - The user's new username.public void setPassword(String inPassword)
inPassword - The user's new passwordpublic void setBalance(int inBalance)
inBalance - The user's new balance.public void setAdmin(boolean inAdmin)
inAdmin - The users new admin status.public int hashCode()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||