|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcommon.ContactList
public class ContactList
A representation of a user's contact list.
| Field Summary | |
|---|---|
private static long |
serialVersionUID
|
(package private) java.util.Vector<User> |
vector
|
| Constructor Summary | |
|---|---|
ContactList()
Creates a new empty contact list. |
|
| Method Summary | |
|---|---|
boolean |
accepts(User user)
Checks if the contact list accepts messages from a user given by argument. |
void |
addUser(User user,
boolean friend)
Adds a User nickname to the contact list. |
ContactList |
clone()
|
boolean |
contains(User user)
|
int |
getSize()
|
User |
getUser(int i)
|
User |
getUser(java.lang.String name)
|
boolean |
removeUser(User user)
Removes a User from the contact list. |
void |
setFriend(User user,
boolean friend)
Sets a contact status. |
void |
setOnLine(User user,
boolean online)
Sets a contact status. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final long serialVersionUID
java.util.Vector<User> vector
| Constructor Detail |
|---|
public ContactList()
| Method Detail |
|---|
public boolean contains(User user)
user - the user to search for.
public void addUser(User user,
boolean friend)
throws UserAlreadyInsertedException
user - the User to addfriend - true if the user to add accepts messages from the user owning Contact List.
UserAlreadyInsertedException - if the user is already present and its friendness does not change.public boolean removeUser(User user)
user - the User to delete
public User getUser(int i)
i - the user id.
public User getUser(java.lang.String name)
name - the nickname.
public boolean accepts(User user)
user - the user
public int getSize()
public void setFriend(User user,
boolean friend)
user - the contact to change status of.friend - true if the contact status must be set to friend, false if the contact must be blocked.
public void setOnLine(User user,
boolean online)
user - the contact to change status of.online - true if the contatc is online, else false.public ContactList clone()
clone in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||