net.rim.blackberry.api.mail
Class Address

java.lang.Object
  extended by net.rim.blackberry.api.mail.Address
Direct Known Subclasses:
PINAddress

public class Address
extends Object

Represents an address in a message.

This includes addresses in the message header fields, such as the sender and recipient, as well as in the message body.

See Also:
Message
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 3.6.0

Field Summary
Category: Signed static String EMAIL_ADDR
          Prefix string for email addresses.
Category: Signed static String FTP_ADDR
          Represents the prefix string for FTP addresses.
Category: Signed static String HTTP_ADDR
          Represents the prefix string for HTTP addresses.
Category: Signed static String WAP_ADDR
          Represents the prefix string for WAP addresses.
 
Constructor Summary
Category: Signed Address(String addr, String name)
          Creates a new Address instance with provided address and name.
 
Method Summary
Category: Signed  boolean equals(Object o)
          Compares this address with provided object.
Category: Signed  String getAddr()
          Retrieves this address's fully qualified address string.
Category: Signed  String getName()
          Retrieves this address's display name.
Category: Signed  String get_type()
          Retrieves this address's type.
Category: Signed  int hashCode()
          Retrieves a hash for this address.
Category: Signed  String toString()
          Produces string form of this address.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 



Field Detail

EMAIL_ADDR

public static String EMAIL_ADDR
Prefix string for email addresses.

Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 3.6.0

HTTP_ADDR

public static String HTTP_ADDR
Represents the prefix string for HTTP addresses.

Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 3.6.0

WAP_ADDR

public static String WAP_ADDR
Represents the prefix string for WAP addresses.

Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 3.6.0

FTP_ADDR

public static String FTP_ADDR
Represents the prefix string for FTP addresses.

Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 3.6.0


Constructor Detail

Address

public Address(String addr,
               String name)
        throws AddressException
Creates a new Address instance with provided address and name.

This constructor sets the address type to Address.EMAIL_ADDR.

Parameters:
addr - Address string, such as "rbarnes@company.com".
name - Address display name, such as "Rob Barnes".
Throws:
AddressException - If you provide an invalid address.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 3.6.0


Method Detail

equals

public boolean equals(Object o)
Compares this address with provided object.

Overrides:
equals in class Object
Parameters:
o - An object to compare to this address.
Returns:
True if provided object is the same object as this address, or if the provided object has the same type, address, and name data; otherwise, false.
See Also:
Boolean.hashCode(), Hashtable
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 3.6.0

hashCode

public int hashCode()
Retrieves a hash for this address.

Overrides:
hashCode in class Object
Returns:
Hash of this object's data.
See Also:
Object.equals(java.lang.Object), Hashtable
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 3.6.0

get_type

public String get_type()
Retrieves this address's type.

Returns:
Type of address.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 3.6.0

getName

public String getName()
Retrieves this address's display name.

Returns:
Display name for this address.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 3.6.0

getAddr

public String getAddr()
Retrieves this address's fully qualified address string.

Returns:
Fully qualified address string.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 3.6.0

toString

public String toString()
Produces string form of this address.

This method produces a string of the form type:address.

Overrides:
toString in class Object
Returns:
String form of this address; for example, "mailto:johndoe@company.com".
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 3.6.0





Copyright 1999-2010 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. All Rights Reserved.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.