net.rim.blackberry.api.bbm.platform.profile
Class BBMPlatformContactList

java.lang.Object
  |
  +--net.rim.blackberry.api.bbm.platform.profile.BBMPlatformContactList

public class BBMPlatformContactList
extends Object

This class represents a collection of BBMPlatformContact objects Methods of this class are not synchronized


Constructor Summary
BBMPlatformContactList()
          Creates a new, empty BBMPlatformContactList instance
 
Method Summary
 void add(BBMPlatformContact con)
          Adds a contact to this list and associates it with handle BBMPlatformContact.getHandle() If contact already exists then it replaces it with this new value
 boolean contains(BBMPlatformContact contact)
          Checks if contact already exists with the same handle as the given contact
 BBMPlatformContact get(String handle)
          Retrieves the contact with the specified handle
 Enumeration getAll()
          Returns all contacts.
 void remove(BBMPlatformContact con)
          Removes contact associated with the handle of provided contact
 int size()
          Returns the total number of contacts in this list.
 

Constructor Detail

BBMPlatformContactList

public BBMPlatformContactList()
Creates a new, empty BBMPlatformContactList instance
Since:
BBM SDK 1.0
Method Detail

add

public void add(BBMPlatformContact con)
Adds a contact to this list and associates it with handle BBMPlatformContact.getHandle() If contact already exists then it replaces it with this new value
Parameters:
con - The contact to add to the list
Throws:
NullPointerException - If contact is null
Since:
BBM SDK 1.0

contains

public boolean contains(BBMPlatformContact contact)
Checks if contact already exists with the same handle as the given contact
Parameters:
contact - Contact to look for
Returns:
true if the contact is in the list, Otherwise false
Since:
BBM SDK 1.0

get

public BBMPlatformContact get(String handle)
Retrieves the contact with the specified handle
Parameters:
handle - unique id of this Contact
Returns:
Contact associated with provided handle, null if no contact associated with the handle
Since:
BBM SDK 1.0

getAll

public Enumeration getAll()
Returns all contacts.
Returns:
Enumeration
Since:
BBM SDK 1.0

remove

public void remove(BBMPlatformContact con)
Removes contact associated with the handle of provided contact
Parameters:
con - The contact to remove
Throws:
NullPointerException - if provided contact is null
Since:
BBM SDK 1.0

size

public int size()
Returns the total number of contacts in this list.
Returns:
count of Contacts in this list
Since:
BBM SDK 1.0



Copyright 1999- Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.