Record Class NewPasswordDto
java.lang.Object
java.lang.Record
com.app.controller.dto.user.NewPasswordDto
- Record Components:
newPassword
- the new password the user wants to setconfirmPassword
- confirmation of the new password to ensure correctnesstoken
- the token used to verify the password reset request (e.g., from email)
public record NewPasswordDto(String newPassword, String confirmPassword, String token)
extends Record
Data Transfer Object (DTO) used for resetting or changing a user's password.
Contains the new password, its confirmation, and a token for verification.
-
Constructor Summary
ConstructorsConstructorDescriptionNewPasswordDto
(String newPassword, String confirmPassword, String token) Creates an instance of aNewPasswordDto
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theconfirmPassword
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.Returns the value of thenewPassword
record component.token()
Returns the value of thetoken
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
NewPasswordDto
Creates an instance of aNewPasswordDto
record class.- Parameters:
newPassword
- the value for thenewPassword
record componentconfirmPassword
- the value for theconfirmPassword
record componenttoken
- the value for thetoken
record component
-
-
Method Details
-
toString
-
hashCode
-
equals
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 withObjects::equals(Object,Object)
. -
newPassword
Returns the value of thenewPassword
record component.- Returns:
- the value of the
newPassword
record component
-
confirmPassword
Returns the value of theconfirmPassword
record component.- Returns:
- the value of the
confirmPassword
record component
-
token
-