java.lang.Object
io.jenetics.jpx.Email
- All Implemented Interfaces:
Serializable,Comparable<Email>
An email address. Broken into two parts (id and domain) to help prevent email
harvesting.
- Since:
- 1.0
- Version:
- 1.2
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionintbooleanReturn the full EMail address: id + "@" + domain.Return the domain half of the email address.getID()Return the id half of the email address.inthashCode()static EmailCreate a newEmailfrom the givenaddressstring.static EmailCreate a newEmailobject with the givenidanddomain.toString()
-
Method Details
-
getID
Return the id half of the email address.- Returns:
- the id half of the email address
-
getDomain
Return the domain half of the email address.- Returns:
- the domain half of the email address
-
getAddress
Return the full EMail address: id + "@" + domain.- Returns:
- the full EMail address: id + "@" + domain
-
compareTo
- Specified by:
compareToin interfaceComparable<Email>
-
hashCode
-
equals
-
toString
-
of
Create a newEmailobject with the givenidanddomain.- Parameters:
id- id half of email address (billgates2004)domain- domain half of email address (hotmail.com)- Returns:
- a new
Emailobject with the given values - Throws:
NullPointerException- if one of the argument isnull
-
of
Create a newEmailfrom the givenaddressstring.- Parameters:
address- the email address string- Returns:
- a new
Emailobject withaddress - Throws:
NullPointerException- if one of the argument isnullIllegalArgumentException- if the givenaddressis invalid
-