|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectblather.model.UserDB
public class UserDB
The UserDB maintains a database of users. That is, it provides a mapping from user names to BlatherUserInterface references.
| Field Summary | |
|---|---|
static long |
serialVersionUID
|
| Constructor Summary | |
|---|---|
UserDB()
|
|
| Method Summary | |
|---|---|
void |
addUser(BlatherUserInterface b)
Adds the given user to the user database. |
BlatherUserInterface |
getUser(java.lang.String username)
Returns the user with the given username. |
java.lang.String[] |
listUserNames()
Returns an array of all user names in the system. |
boolean |
userExists(java.lang.String username)
Returns true if the user with the given name exists. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final long serialVersionUID
| Constructor Detail |
|---|
public UserDB()
| Method Detail |
|---|
public void addUser(BlatherUserInterface b)
b - a reference to an instance of a class implementing BlatherUserInterfacepublic BlatherUserInterface getUser(java.lang.String username)
username - a username
public boolean userExists(java.lang.String username)
username - a username
public java.lang.String[] listUserNames()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||