Record Class EMailChangeEvent.EMailChange

java.lang.Object
java.lang.Record
de.gustavblass.fsu.fmi.roombooking.events.EMailChangeEvent.EMailChange
Record Components:
actor - The user who wants to change their e-mail address.
newEmail - The new e-mail address that shall replace the current one.
verificationToken - The token that will be included in the confirmation e-mail to verify the newEmail.
Enclosing class:
EMailChangeEvent

public static record EMailChangeEvent.EMailChange(@NonNull Actor actor, @NonNull String newEmail, @NonNull EMailVerificationToken verificationToken) extends Record
Represents an Actor's wish to update their Actor.eMailAddress.
  • Field Details

    • actor

      @NonNull private final @NonNull Actor actor
      The field for the actor record component.
    • newEmail

      @NonNull private final @NonNull String newEmail
      The field for the newEmail record component.
    • verificationToken

      @NonNull private final @NonNull EMailVerificationToken verificationToken
      The field for the verificationToken record component.
  • Constructor Details

    • EMailChange

      public EMailChange(@NonNull @NonNull Actor actor, @NonNull @NonNull String newEmail, @NonNull @NonNull EMailVerificationToken verificationToken)
      Creates an instance of a EMailChange record class.
      Parameters:
      actor - the value for the actor record component
      newEmail - the value for the newEmail record component
      verificationToken - the value for the verificationToken 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.
    • actor

      @NonNull public @NonNull Actor actor()
      Returns the value of the actor record component.
      Returns:
      the value of the actor record component
    • newEmail

      @NonNull public @NonNull String newEmail()
      Returns the value of the newEmail record component.
      Returns:
      the value of the newEmail record component
    • verificationToken

      @NonNull public @NonNull EMailVerificationToken verificationToken()
      Returns the value of the verificationToken record component.
      Returns:
      the value of the verificationToken record component