impl: ap req
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user