Record Class PersonData
java.lang.Object
java.lang.Record
cz.cuni.kubinja.hospitalsystem.personnel.util.PersonData
- Record Components:
firstName- Firstname of the person.lastName- Lastname of the person.dateOfBirth- Date of birth of the person.
-
Constructor Summary
ConstructorsConstructorDescriptionPersonData(String firstName, String lastName, LocalDate dateOfBirth) Creates an instance of aPersonDatarecord class. -
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.lastName()Returns the value of thelastNamerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
PersonData
Creates an instance of aPersonDatarecord class.- Parameters:
firstName- the value for thefirstNamerecord componentlastName- the value for thelastNamerecord componentdateOfBirth- the value for thedateOfBirthrecord 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). -
firstName
-
lastName
-
dateOfBirth
Returns the value of thedateOfBirthrecord component.- Returns:
- the value of the
dateOfBirthrecord component
-