Package de.xima.fc.appointment
Class ExtendedAppointmentFreeSlot
java.lang.Object
de.xima.fc.appointment.ExtendedAppointmentFreeSlot
POJO helper class for the appointment free slot query result builder. Simliar to a
AppointmentSlot
, but with
more info.- Since:
- 6.5.0
- Author:
- XIMA MEDIA GmbH
-
Constructor Summary
ConstructorsConstructorDescriptionExtendedAppointmentFreeSlot
(ZonedDateTime dateTimeFrom, ZonedDateTime dateTimeUntil, long capacity) Creates a new slot starting at the given time and lasting for the given duration. -
Method Summary
Modifier and TypeMethodDescriptionlong
com.google.common.collect.Range<Instant>
withReducedCapacity
(long amountToReduce)
-
Constructor Details
-
ExtendedAppointmentFreeSlot
public ExtendedAppointmentFreeSlot(ZonedDateTime dateTimeFrom, ZonedDateTime dateTimeUntil, long capacity) Creates a new slot starting at the given time and lasting for the given duration.- Parameters:
dateTimeFrom
- Start time of the slot.dateTimeUntil
- End time of the slot.capacity
- Capacity of the slot, i.e. how many appointments can be booked at once for this slot.
-
-
Method Details
-
getCapacity
public long getCapacity()- Returns:
- Capacity of the slot, i.e. how many appointments can be booked at once for this slot.
-
getDateFrom
- Returns:
- The start date of this slot.
-
getDateTimeUntil
- Returns:
- The end date time of this slot.
-
getDateUntil
- Returns:
- The end date of this slot.
-
getInstant
- Returns:
- The start and end point of this slot.
-
getInstantFrom
- Returns:
- The start point of this slot.
-
getTimeFrom
- Returns:
- The start time of this slot.
-
withReducedCapacity
- Parameters:
amountToReduce
- Amount by which to reduce the capacity.- Returns:
- A new slot, with the capacity reduced by the given amount.
-