Package com.brodygaudel.bank.common.dto
Record Class CustomerRequestDTO
java.lang.Object
java.lang.Record
com.brodygaudel.bank.common.dto.CustomerRequestDTO
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedateOfBirth
record component.final boolean
Indicates whether some other object is "equal to" this one.Returns the value of thefirstname
record component.final int
hashCode()
Returns a hash code value for this object.name()
Returns the value of thename
record component.Returns the value of thenationality
record component.nic()
Returns the value of thenic
record component.Returns the value of theplaceOfBirth
record component.sex()
Returns the value of thesex
record component.final String
toString()
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 aCustomerRequestDTO
record class.- Parameters:
nic
- the value for thenic
record componentfirstname
- the value for thefirstname
record componentname
- the value for thename
record componentplaceOfBirth
- the value for theplaceOfBirth
record componentdateOfBirth
- the value for thedateOfBirth
record componentnationality
- the value for thenationality
record componentsex
- the value for thesex
record 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 thenic
record component.- Returns:
- the value of the
nic
record component
-
firstname
Returns the value of thefirstname
record component.- Returns:
- the value of the
firstname
record component
-
name
Returns the value of thename
record component.- Returns:
- the value of the
name
record component
-
placeOfBirth
Returns the value of theplaceOfBirth
record component.- Returns:
- the value of the
placeOfBirth
record component
-
dateOfBirth
Returns the value of thedateOfBirth
record component.- Returns:
- the value of the
dateOfBirth
record component
-
nationality
Returns the value of thenationality
record component.- Returns:
- the value of the
nationality
record component
-
sex
Returns the value of thesex
record component.- Returns:
- the value of the
sex
record component
-