Package de.adrianlange.mcd.strategy
Class EmailAddress.DomainPart
java.lang.Object
de.adrianlange.mcd.strategy.EmailAddress.DomainPart
- Enclosing class:
- EmailAddress
Internal representation of the domain part of an email address.
The domain part of an email john.doe+some-verp@example.com is example.com.
-
Method Summary
Modifier and TypeMethodDescriptionbooleaninthashCode()static EmailAddress.DomainPartCreates a new domain part.static EmailAddress.DomainPartCreates a new domain part from an IDN domain.static EmailAddress.DomainPartCreates a new domain part from a unicode domain.toIdn()Returns the domain part as IDN string.toString()Returns the domain part as unicode string.
-
Method Details
-
toUnicode
Returns the domain part as unicode string.- Returns:
- Domain part as unicode string
-
toIdn
Returns the domain part as IDN string.- Returns:
- Domain part as IDN string
-
toString
-
equals
-
hashCode
public int hashCode() -
of
Creates a new domain part. UseofUnicode(String)orofIdn(String)if you know the domain format.- Parameters:
domainPart- String representation of the domain part, must not be null- Returns:
- new DomainPart object created from the given string representation
-
ofUnicode
Creates a new domain part from a unicode domain. IDN domain parts must useofIdn(String).- Parameters:
unicodeDomainPart- String representation of the domain part, must not be null- Returns:
- new DomainPart object created from the given string representation
-
ofIdn
Creates a new domain part from an IDN domain. Unicode domain parts must useofUnicode(String).- Parameters:
idnDomainPart- String representation of the domain part, must not be null- Returns:
- new DomainPart object created from the given string representation
-