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

EmailField

public class EmailField extends SDPField
email field in the SDP announce.
version
JSR141-PUBLIC-REVIEW (subject to change). This code is in the public domain.

Fields Summary
protected EmailAddress
emailAddress
Email address.
Constructors Summary
public EmailField()
DEfault constructor.

	super(SDPFieldNames.EMAIL_FIELD);
	emailAddress = new EmailAddress();
    
Methods Summary
public java.lang.Objectclone()
Copies the current instance.

return
the copy of this object

	EmailField retval = new EmailField();
	if (emailAddress != null)
	    retval.emailAddress = (EmailAddress) this.emailAddress.clone();
	return retval;
    
public java.lang.Stringencode()
Gets the string encoded version of this object.

return
encoded string of object contents
since
v1.0

	return EMAIL_FIELD + emailAddress.encode() + Separators.NEWLINE;
    
public EmailAddressgetEmailAddress()
Gets the email address.

return
the email address

	return emailAddress;
    
public java.lang.StringgetValue()
Gets the email address value.

throws
SdpParseException if a parsing error occurs
return
the value

	if (emailAddress == null)
	    return null;
	else {
	    return emailAddress.getDisplayName(); 
	}
    
public voidsetEmailAddress(EmailAddress emailAddress)
Sets the email address member.

param
emailAddress the new email address

	this.emailAddress = emailAddress;
    
public voidsetValue(java.lang.String value)
Sets the email value.

param
value to set
throws
SdpException if the value is null

	if (value == null)
	    throw new SdpException("The value is null");
	else {
 
	    emailAddress.setDisplayName(value);
	}
    
public java.lang.StringtoString()
Gets the string encoded version of this object.

return
encoded string of object contents

 return this.encode();