Record Class AppointmentData
java.lang.Object
java.lang.Record
cz.cuni.kubinja.hospitalsystem.calendar.util.AppointmentData
- Record Components:
patientsId- Identifier of patient connected to the appointment.doctorsId- Identifier of doctor connected to the appointment.starTime- Starting time of the appointment.endTime- Ending time of the appointment.
public record AppointmentData(int patientsId, int doctorsId, LocalDateTime starTime, LocalDateTime endTime)
extends Record
Data wrapper for appointment.
-
Constructor Summary
ConstructorsConstructorDescriptionAppointmentData(int patientsId, int doctorsId, LocalDateTime starTime, LocalDateTime endTime) Creates an instance of aAppointmentDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thedoctorsIdrecord component.endTime()Returns the value of theendTimerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of thepatientsIdrecord component.starTime()Returns the value of thestarTimerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
AppointmentData
public AppointmentData(int patientsId, int doctorsId, LocalDateTime starTime, LocalDateTime endTime) Creates an instance of aAppointmentDatarecord class.- Parameters:
patientsId- the value for thepatientsIdrecord componentdoctorsId- the value for thedoctorsIdrecord componentstarTime- the value for thestarTimerecord componentendTime- the value for theendTimerecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
patientsId
public int patientsId()Returns the value of thepatientsIdrecord component.- Returns:
- the value of the
patientsIdrecord component
-
doctorsId
-
starTime
-
endTime
-