Compoze Software, Inc.

com.compoze.mail
Class InternetMailAddress


java.lang.Object

  |

  +--com.compoze.mail.InternetMailAddress

All Implemented Interfaces:
IMailAddress, java.io.Serializable

public class InternetMailAddress
extends java.lang.Object
implements IMailAddress, java.io.Serializable

This is a concrete implementation of IMailAddress.

See Also:
Serialized Form

Constructor Summary
InternetMailAddress(java.lang.String sAddress)
          Constructor.
InternetMailAddress(java.lang.String sName, java.lang.String sAddress)
          Constructor.
 
Method Summary
 boolean equals(java.lang.Object o)
          Indicates whether some other FlagText object is "equal to" this one.
 java.lang.String getAddress()
          Gets the address.
 java.lang.String getFullAddress()
          Gets the full address of this mail address.
 java.lang.String getName()
          Gets the personal name of the mail address.
 void setAddress(java.lang.String sAddress)
          Sets the address.
 void setName(java.lang.String sName)
          Sets the personal name of the mail address.
 java.lang.String toString()
          Returns the string representation of this object.
 void validate()
          This method validates an email address.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InternetMailAddress


public InternetMailAddress(java.lang.String sAddress)
Constructor.
Parameters:
sAddress - the mail address

InternetMailAddress


public InternetMailAddress(java.lang.String sName,
                           java.lang.String sAddress)
Constructor.
Parameters:
sName - the personal name
sAddress - the mail address (may not be null or empty)
Method Detail

getName


public java.lang.String getName()
Description copied from interface: IMailAddress
Gets the personal name of the mail address.
Specified by:
getName in interface IMailAddress
Following copied from interface: com.compoze.mail.IMailAddress
Returns:
the personal name of the mail address

setName


public void setName(java.lang.String sName)
Description copied from interface: IMailAddress
Sets the personal name of the mail address.
Specified by:
setName in interface IMailAddress
Following copied from interface: com.compoze.mail.IMailAddress
Parameters:
sName - the personal name of the mail address

setAddress


public void setAddress(java.lang.String sAddress)
Description copied from interface: IMailAddress
Sets the address.
Specified by:
setAddress in interface IMailAddress
Following copied from interface: com.compoze.mail.IMailAddress
Parameters:
sAddress - the address

getAddress


public java.lang.String getAddress()
Description copied from interface: IMailAddress
Gets the address.
Specified by:
getAddress in interface IMailAddress
Following copied from interface: com.compoze.mail.IMailAddress
Returns:
the address

getFullAddress


public java.lang.String getFullAddress()
Description copied from interface: IMailAddress
Gets the full address of this mail address.
Specified by:
getFullAddress in interface IMailAddress
Following copied from interface: com.compoze.mail.IMailAddress
Returns:
the full address of this mail address

equals


public boolean equals(java.lang.Object o)
Indicates whether some other FlagText object is "equal to" this one. The email address is used to determine equality.
Overrides:
equals in class java.lang.Object
Returns:
if true, this object is the same as the obj argument; false otherwise

validate


public void validate()
              throws MailException
This method validates an email address. An email address is valid if it is in proper Internet Email (RFC822) format.
Specified by:
validate in interface IMailAddress
Throws:
MailException -  

toString


public java.lang.String toString()
Returns the string representation of this object.
Overrides:
toString in class java.lang.Object
Returns:
the string representation of this object

Compoze Software, Inc.

Copyright ©1999-2001 Compoze Software, Inc. All rights reserved.