diff --git a/assignment/src/main/java/appointmentplanner/AppointmentRequestImpl.java b/assignment/src/main/java/appointmentplanner/AppointmentRequestImpl.java new file mode 100644 index 0000000..ce6d2e5 --- /dev/null +++ b/assignment/src/main/java/appointmentplanner/AppointmentRequestImpl.java @@ -0,0 +1,41 @@ +package appointmentplanner; + +import java.time.LocalTime; + +import appointmentplanner.api.AppointmentData; +import appointmentplanner.api.AppointmentRequest; +import appointmentplanner.api.TimePreference; + +public class AppointmentRequestImpl implements AppointmentRequest { + + private AppointmentData data; + private LocalTime startTime; + private TimePreference timePreference; + + public AppointmentRequestImpl(AppointmentData data, LocalTime startTime, TimePreference timePreference) { + this.data = data; + this.startTime = startTime; + this.timePreference = timePreference; + } + + public AppointmentRequestImpl(AppointmentData data, LocalTime startTime) { + this.data = data; + this.startTime = startTime; + } + + @Override + public LocalTime startTime() { + return this.startTime; + } + + @Override + public AppointmentData appointmentData() { + return this.data; + } + + @Override + public TimePreference timePreference() { + return this.timePreference; + } + +}