Package de.aristaflow.adept2.model.mail
Class EmailAddress
- java.lang.Object
-
- de.aristaflow.adept2.model.mail.EmailAddress
-
- All Implemented Interfaces:
Serializable
public class EmailAddress extends Object implements Serializable
This class represents an email address with the address (first.last@xyz.com
) and an optional name, e. g.First Last
.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description EmailAddress(String address)
Creates a newEmailAddress
for the designated address (and no name).EmailAddress(String name, String address)
Creates a newEmailAddress
for the designated name and address.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getAddress()
Gets the mail address of thisEmailAddress
.String
getName()
Gets the human-readable name of thisEmailAddress
ornull
.String
toString()
-
-
-
Constructor Detail
-
EmailAddress
public EmailAddress(String address)
Creates a newEmailAddress
for the designated address (and no name).- Parameters:
address
- The address for which to create a newEmailAddress
.
-
EmailAddress
public EmailAddress(String name, String address)
Creates a newEmailAddress
for the designated name and address.- Parameters:
name
- The human-readable name for which to create a newEmailAddress
. This must not be empty but it may benull
.address
- The address for which to create a newEmailAddress
.
-
-