Package com.sanctionco.thunder.models
Class Email
java.lang.Object
com.sanctionco.thunder.models.Email
Represents an email address, providing access to the email address,
verification status, and verification token.
- See Also:
User
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleaninthashCode()booleantoString()static Emailunverified(String address)Creates a new unverifiedEmailinstance.Creates a copy of thisEmailinstance with the verified property set to true.
-
Constructor Details
-
Email
Constructs a new email with the given address, verified status, and verification token.- Parameters:
address- the email's addressverified- whether the email address has been verifiedverificationToken- the email's verification token used to verify the email address
-
-
Method Details
-
getAddress
-
getVerificationToken
-
isVerified
public boolean isVerified() -
verifiedCopy
Creates a copy of thisEmailinstance with the verified property set to true.- Returns:
- a new instance of
Emailwith the verified property set to true
-
equals
-
hashCode
public int hashCode() -
toString
-
unverified
Creates a new unverifiedEmailinstance.- Parameters:
address- the email address- Returns:
- a new
Emailinstance
-