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