|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectblather.model.BlatherUser
public class BlatherUser
BlatherUser models a user of the Blather application. A user has a username, an email address, a password, and a collection of friends (other BlatherUsers).
| Field Summary |
|---|
| Fields inherited from interface blather.model.BlatherUserInterface |
|---|
serialVersionUID |
| Constructor Summary | |
|---|---|
BlatherUser(java.lang.String username,
java.lang.String password,
EmailAddressInterface email)
Creates a new BlatherUser with the given username, password, and address. |
|
| Method Summary | |
|---|---|
void |
addBlab(BlabInterface b)
Creates a new blab for this user. |
void |
addFriend(BlatherUserInterface newFriend)
Adds a new friend, so that this BlatherUser will be tracking the blabs of newFriend. |
int |
blabCount()
Returns the number of blabs this user has posted. |
boolean |
checkPassword(java.lang.String password)
Returns true if the given password is correct for this BlatherUser, false otherwise. |
int |
friendCount()
Returns the number of BlatherUsers this user has befriended. |
BlabInterface[] |
getAllBlabs()
Returns a copy of the array of all Blabs authored by this user. |
BlabInterface |
getBlab(int id)
Returns this user's blab with the given identifier. |
EmailAddressInterface |
getEmail()
Returns this BlatherUser's email address |
BlatherUserInterface |
getFriend(int id)
Returns a BlatherUser corresponding to this user's friend with friend identifier id. |
java.lang.String |
getUsername()
Returns this BlatherUser's username (that is, his or her display name). |
void |
setEmail(EmailAddressInterface email)
Updates this BlatherUser's email address. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BlatherUser(java.lang.String username,
java.lang.String password,
EmailAddressInterface email)
username - password - address - | Method Detail |
|---|
public java.lang.String getUsername()
BlatherUserInterface
getUsername in interface BlatherUserInterfacepublic EmailAddressInterface getEmail()
BlatherUserInterface
getEmail in interface BlatherUserInterfacepublic void setEmail(EmailAddressInterface email)
BlatherUserInterface
setEmail in interface BlatherUserInterfacepublic boolean checkPassword(java.lang.String password)
BlatherUserInterface
checkPassword in interface BlatherUserInterfacepublic int friendCount()
BlatherUserInterface
friendCount in interface BlatherUserInterfacepublic BlatherUserInterface getFriend(int id)
BlatherUserInterface
getFriend in interface BlatherUserInterfaceid - the id number of the friend to returnpublic void addFriend(BlatherUserInterface newFriend)
BlatherUserInterface
addFriend in interface BlatherUserInterfacepublic int blabCount()
BlatherUserInterface
blabCount in interface BlatherUserInterfacepublic BlabInterface getBlab(int id)
BlatherUserInterface
getBlab in interface BlatherUserInterfacepublic void addBlab(BlabInterface b)
BlatherUserInterface
addBlab in interface BlatherUserInterfacepublic BlabInterface[] getAllBlabs()
BlatherUserInterface
getAllBlabs in interface BlatherUserInterface
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||