FileDocCategorySizeDatePackage
EmailAddress.javaAPI DocphoneME MR2 API (J2ME)2919Wed May 02 18:00:42 BST 2007gov.nist.javax.sdp.fields

EmailAddress

public class EmailAddress extends SDPObject
Email address field of the SDP header.
version
JSR141-PUBLIC-REVIEW (subject to change) This code is in the public domain.

Fields Summary
protected String
displayName
Current user friendly display name.
protected Email
email
Current email address
Constructors Summary
Methods Summary
public java.lang.Objectclone()
Copies the current instance.

return
the copy of this object

	EmailAddress retval = new EmailAddress();
	retval.displayName = displayName;
	if (email != null) retval.email = (Email) email.clone();
	return retval;
    
public java.lang.Stringencode()
Gets the string encoded version of this object. Here, we implement only the "displayName <email>" form and not the "email (displayName)" form.

return
the encoded string of this object contents
since
v1.0

	String encoded_string;
 
	if (displayName != null) {
	    encoded_string = displayName + Separators.LESS_THAN;
	} else {
	    encoded_string = "";
	}
	encoded_string += email.encode();
	if (displayName != null) {
	    encoded_string += Separators.GREATER_THAN;
	}
	return encoded_string;
    
public java.lang.StringgetDisplayName()
Gets the current user friendly name.

return
the display name

	return displayName;
    
public voidsetDisplayName(java.lang.String displayName)
Sets the display name member.

param
displayName the new display name

	this.displayName = displayName;
    
public voidsetEmail(Email email)
Sets the email address member.

param
email the new email address

	this.email = email;