JML

net.sf.jml.impl
Class MsnContactListImpl

java.lang.Object
  extended by net.sf.jml.impl.MsnContactListImpl
All Implemented Interfaces:
MsnContactList

public class MsnContactListImpl
extends Object
implements MsnContactList

Author:
Roger Chen

Constructor Summary
MsnContactListImpl(MsnMessenger messenger)
           
 
Method Summary
 void addContact(MsnContact contact)
           
 void addGroup(MsnGroup group)
           
 MsnContact getContactByEmail(Email email)
          Get the contact in the contact list.
 MsnContact getContactById(String id)
          Get the contact in the contact list.
 int getContactCount()
           
 MsnContact[] getContacts()
          Get the contacts in the contact list.
 MsnContact[] getContactsInList(MsnList list)
          Get the contacts in the MsnList.
 int getCurrentContactCount()
          Return contact count in current contact list.
 int getCurrentGroupCount()
          Return group count in current contact list.
 MsnGroup getDefaultGroup()
          Get the default group.
 MsnGroup getGroup(String groupId)
          Get the group in the contact list.
 int getGroupCount()
           
 MsnGroup[] getGroups()
          Get the groups in the contact list.
 MsnMessenger getMessenger()
          Get the MsnMessenger the contact list belongs to.
 String getVersion()
          Contact list version number.
 void removeContactByEmail(Email email)
           
 void removeContactById(String id)
           
 void removeGroup(String groupId)
           
 void setContactCount(int contactCount)
           
 void setGroupCount(int groupCount)
           
 void setVersion(String version)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MsnContactListImpl

public MsnContactListImpl(MsnMessenger messenger)
Method Detail

getMessenger

public MsnMessenger getMessenger()
Description copied from interface: MsnContactList
Get the MsnMessenger the contact list belongs to.

Specified by:
getMessenger in interface MsnContactList
Returns:
MsnMessenger

getVersion

public String getVersion()
Description copied from interface: MsnContactList
Contact list version number. If the version is the same as msn server contact list version, OutgoingSYN will not return the whole contact list.

Specified by:
getVersion in interface MsnContactList
Returns:
contact list version

getDefaultGroup

public MsnGroup getDefaultGroup()
Description copied from interface: MsnContactList
Get the default group.

Specified by:
getDefaultGroup in interface MsnContactList
Returns:
default group

getGroups

public MsnGroup[] getGroups()
Description copied from interface: MsnContactList
Get the groups in the contact list.

Specified by:
getGroups in interface MsnContactList
Returns:
groups in the contact list

getGroup

public MsnGroup getGroup(String groupId)
Description copied from interface: MsnContactList
Get the group in the contact list.

Specified by:
getGroup in interface MsnContactList
Parameters:
groupId - group id
Returns:
MsnGroup

getContacts

public MsnContact[] getContacts()
Description copied from interface: MsnContactList
Get the contacts in the contact list.

Specified by:
getContacts in interface MsnContactList
Returns:
the contacts in the contact list

getContactById

public MsnContact getContactById(String id)
Description copied from interface: MsnContactList
Get the contact in the contact list.

Specified by:
getContactById in interface MsnContactList
Parameters:
id - contact's id
Returns:
MsnContact

getContactByEmail

public MsnContact getContactByEmail(Email email)
Description copied from interface: MsnContactList
Get the contact in the contact list.

Specified by:
getContactByEmail in interface MsnContactList
Parameters:
email - contact's email
Returns:
MsnContact

getContactsInList

public MsnContact[] getContactsInList(MsnList list)
Description copied from interface: MsnContactList
Get the contacts in the MsnList.

Specified by:
getContactsInList in interface MsnContactList
Parameters:
list - MsnList
Returns:
the contacts in the MsnList

setVersion

public void setVersion(String version)

addGroup

public void addGroup(MsnGroup group)

removeGroup

public void removeGroup(String groupId)

setGroupCount

public void setGroupCount(int groupCount)

getGroupCount

public int getGroupCount()

getCurrentGroupCount

public int getCurrentGroupCount()
Return group count in current contact list. When not SYN completed, this number may be different from getGroupCount().

Returns:
current group count

addContact

public void addContact(MsnContact contact)

removeContactById

public void removeContactById(String id)

removeContactByEmail

public void removeContactByEmail(Email email)

getContactCount

public int getContactCount()

setContactCount

public void setContactCount(int contactCount)

getCurrentContactCount

public int getCurrentContactCount()
Return contact count in current contact list. When not SYN completed, this number may be different from getContactCount().

Returns:
current contact count

toString

public String toString()
Overrides:
toString in class Object

JML