SHOW Signed

net.rim.blackberry.api.mail
Class Address

java.lang.Object
  |
  +--net.rim.blackberry.api.mail.Address

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.

Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

See Also:
Message

Field Summary
 Category: Signed protected  String _addr
          The fully qualified address string, such as "johndoe@company.com".
 Category: Signed protected  String _name
          The full display name, such as "John Doe".
 Category: Signed protected  String _type
          The address type, such as "mailto", "http", "ftp", etc.
 Category: Signed static String EMAIL_ADDR
          Represents the 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)
          Constructor for email addresses.
 
Method Summary
 Category: Signed  boolean equals(Object o)
          Compares two addresses.
 Category: Signed  String get_type()
          Retrieves the address type.
 Category: Signed  String getAddr()
          Retrieves the fully qualified address string.
 Category: Signed  String getName()
          Retrieves the address name.
 Category: Signed  int hashCode()
          Returns a hash code value for the object.
 Category: Signed  String toString()
          Creates a string representation of an Address object by combining the type and addr fields.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

EMAIL_ADDR

public static String EMAIL_ADDR
Represents the prefix string for email addresses.
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

HTTP_ADDR

public static String HTTP_ADDR
Represents the prefix string for HTTP addresses.
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

WAP_ADDR

public static String WAP_ADDR
Represents the prefix string for WAP addresses.
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

FTP_ADDR

public static String FTP_ADDR
Represents the prefix string for FTP addresses.
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

_type

protected String _type
The address type, such as "mailto", "http", "ftp", etc.
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

_addr

protected String _addr
The fully qualified address string, such as "johndoe@company.com".
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

_name

protected String _name
The full display name, such as "John Doe".
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
Constructor Detail

Address

public Address(String addr,
               String name)
        throws AddressException
Constructor for email addresses. This constructor requires parameters for the address string and name. The address type is set to EMAIL_ADDR.

Parameters:
addr - Address string, such as "rbarnes@company.com".
name - Address display name, such as "Rob Barnes".
Throws:
AddressException - Indicates an invalid _address.
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
Method Detail

equals

public boolean equals(Object o)
Compares two addresses.

Overrides:
equals in class Object
Parameters:
address - An Address object to compare to the current Address.
Returns:
True if the addresses match (same type, string, name); otherwise false.
Since:
JDE 3.6
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

hashCode

public int hashCode()
Description copied from class: Object
Returns a hash code value for the object. This method is supported for the benefit of hashtables such as those provided by java.util.Hashtable.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals(Object) method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the Object.equals(java.lang.Object) method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hashtables.

As much as is reasonably practical, the hashCode method defined by class Object does return distinct integers for distinct objects. (This is typically implemented by converting the internal address of the object into an integer, but this implementation technique is not required by the JavaTM programming language.)

Overrides:
hashCode in class Object
Following copied from class: java.lang.Object
Returns:
a hash code value for this object.
See Also:
Object.equals(java.lang.Object), Hashtable
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

get_type

public String get_type()
Retrieves the address type.

Returns:
The string that identifies the address type.
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

getName

public String getName()
Retrieves the address name.

Returns:
The full display name of this address.
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

getAddr

public String getAddr()
Retrieves the fully qualified address string.

Returns:
The fully qualified address string.
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

toString

public String toString()
Creates a string representation of an Address object by combining the type and addr fields.

Overrides:
toString in class Object
Returns:
A string that represents the address; for example, "mailto:johndoe@company.com".
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.


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