Class BookingSlot

All Implemented Interfaces:
IntervalLike, Comparable<IntervalLike>

public class BookingSlot extends Slot
Represents a time interval booked by a specific booker.

A BookingSlot is a specialization of Slot that includes information about the entity (booker) that owns the booking. It provides additional methods for intersection checks and for computing exclusions relative to other intervals.

Author:
Andrey Korotin
  • Constructor Details

    • BookingSlot

      public BookingSlot(Object booker, double beginTime, double endTime)
      Constructs a new BookingSlot for the given booker and time interval.
      Parameters:
      booker - the object representing the entity that made the booking (must not be null)
      beginTime - the start time of the slot
      endTime - the end time of the slot
      Throws:
      NullPointerException - if booker is null
  • Method Details

    • getBooker

      public Object getBooker()
      Returns the booker associated with this slot.
      Returns:
      the object representing the booker
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Interval