|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.clapper.util.mail.EmailAddress
public class EmailAddress
This class encodes an RFC822-compliant email address is a simplified container, hiding the gory details of the underlying Java Mail API.
EmailMessage| Constructor Summary | |
|---|---|
EmailAddress(EmailAddress emailAddress)
Constructs a new copy of an existing EmailMessage object. |
|
EmailAddress(java.lang.String address)
Constructs a new EmailMessage object from an email address string. |
|
| Method Summary | |
|---|---|
java.lang.Object |
clone()
Clone this object. |
int |
compareTo(java.lang.Object obj)
Compare two email addresses. |
boolean |
equals(java.lang.Object obj)
Determine whether this email address is equivalent to another email address, by comparing the normalized address strings. |
java.lang.String |
getAddress()
Get the RFC822-compliant email address string associated with this EmailAddress object. |
java.lang.String |
getPersonalName()
Get the user friend personal name associated with this EmailAddress object. |
int |
hashCode()
Get the hash code for this object. |
static int |
parse(java.lang.String s,
java.util.Collection<EmailAddress> collection)
Parse a sequence of comma-separated email addresses into individual EmailAddress objects, enforcing strict Internet RFC822 email address syntax requirements. |
java.lang.String |
toString()
Convert this object into an RFC822-compliant email address. |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public EmailAddress(java.lang.String address)
throws EmailException
The @domain portion must be present.renoir@example.com Pierre Auguste Renoir"Pierre Auguste Renoir" renoir@example.com (Pierre Auguste Renoir)
address - the address
EmailException - bad email address
public EmailAddress(EmailAddress emailAddress)
throws EmailException
emailAddress - The EmailMessage object to copy
EmailException - bad email address| Method Detail |
|---|
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - the other email address. Must be an EmailAddress
object.
public int hashCode()
hashCode in class java.lang.Objectpublic int compareTo(java.lang.Object obj)
compareTo in interface java.lang.Comparableobj - the other email address. Must be an EmailAddress
object.
public java.lang.String getAddress()
getPersonalName()public java.lang.String getPersonalName()
getAddress()
public static int parse(java.lang.String s,
java.util.Collection<EmailAddress> collection)
throws EmailException
s - comma-separated address stringscollection - where to stored the parsed EmailAddress
objects
EmailException - if a bad address is encounteredpublic java.lang.String toString()
toString in class java.lang.Object
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class java.lang.Objectjava.lang.CloneNotSupportedException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||