Record Class EmailWithRandomValue

java.lang.Object
java.lang.Record
com.digicert.validation.methods.email.prepare.EmailWithRandomValue
Record Components:
email - The email address.

The `email` parameter represents the email address that is being validated. It is a string that should conform to standard email format rules.

randomValue - The random value that was sent to the email address.

The `randomValue` parameter is a string that contains a randomly generated value sent to the email address. This value is used as a verification code to confirm that the email address is valid and accessible by the intended recipient.


public record EmailWithRandomValue(String email, String randomValue) extends Record
This class is used to store the email address and the random value that was sent to the email address.

The `EmailWithRandomValue` class is a record that encapsulates an email address and a corresponding random value. This random value is used in the email validation process in order verify the ownership of an email address.

  • Field Details

    • email

      private final String email
      The field for the email record component.
    • randomValue

      private final String randomValue
      The field for the randomValue record component.
  • Constructor Details

    • EmailWithRandomValue

      public EmailWithRandomValue(String email, String randomValue)
      Creates an instance of a EmailWithRandomValue record class.
      Parameters:
      email - the value for the email record component
      randomValue - the value for the randomValue record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • email

      public String email()
      Returns the value of the email record component.
      Returns:
      the value of the email record component
    • randomValue

      public String randomValue()
      Returns the value of the randomValue record component.
      Returns:
      the value of the randomValue record component