public class EmailAddress
extends java.lang.Object
Constructor and Description |
---|
EmailAddress()
Creates an empty email address
|
EmailAddress(java.lang.String email)
Creates a new email address based on the given string
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAddress()
Returns the address
|
java.lang.String |
getName()
Returns the display name
|
void |
setAddress(java.lang.String address)
Sets the email address.
|
void |
setName(java.lang.String name)
Sets the personal / display name of the address.
|
java.lang.String |
toString()
Constructs a string "name <address>" or "address"
|
public EmailAddress()
public EmailAddress(java.lang.String email)
email
- the email address (with or without <>)
Acceptable forms include:
address
<address>
name <address>
<address> name
(name) address
address (name)public void setName(java.lang.String name)
name
- the display namepublic void setAddress(java.lang.String address)
address
- the actual email address (without <>)public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getAddress()
public java.lang.String getName()