Package com.brodygaudel.bank.common.dto
Record Class CustomerRequestDTO
java.lang.Object
java.lang.Record
com.brodygaudel.bank.common.dto.CustomerRequestDTO
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedateOfBirthrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thefirstnamerecord component.final inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.Returns the value of thenationalityrecord component.nic()Returns the value of thenicrecord component.Returns the value of theplaceOfBirthrecord component.sex()Returns the value of thesexrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CustomerRequestDTO
public CustomerRequestDTO(String nic, String firstname, String name, String placeOfBirth, LocalDate dateOfBirth, String nationality, Sex sex) Creates an instance of aCustomerRequestDTOrecord class.- Parameters:
nic- the value for thenicrecord componentfirstname- the value for thefirstnamerecord componentname- the value for thenamerecord componentplaceOfBirth- the value for theplaceOfBirthrecord componentdateOfBirth- the value for thedateOfBirthrecord componentnationality- the value for thenationalityrecord componentsex- the value for thesexrecord component
-
-
Method Details
-
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. -
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. -
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). -
nic
Returns the value of thenicrecord component.- Returns:
- the value of the
nicrecord component
-
firstname
Returns the value of thefirstnamerecord component.- Returns:
- the value of the
firstnamerecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
placeOfBirth
Returns the value of theplaceOfBirthrecord component.- Returns:
- the value of the
placeOfBirthrecord component
-
dateOfBirth
Returns the value of thedateOfBirthrecord component.- Returns:
- the value of the
dateOfBirthrecord component
-
nationality
Returns the value of thenationalityrecord component.- Returns:
- the value of the
nationalityrecord component
-
sex
Returns the value of thesexrecord component.- Returns:
- the value of the
sexrecord component
-