Interface Appointment

All Superinterfaces:
AppointmentData, Comparable<TimeSlot>, TimeSlot

public interface Appointment extends TimeSlot, AppointmentData
Appointment that is scheduled using the appointment planner. An Appointment is not created from 'the outside API', but created by the appointment planner service, being the actual TimeLine implementation. In the TimeLine, you'll determine if a request can be accepted and an Appointment object can be created. Having an appointment therefore implies that there has been a successful allocation on a day at a time. The appointment is only valid when it is allocated on some timeline. An appointment holds an AppointmentRequest and a start Instant.
Author:
Richard van den Ham r.vandenham@fontys.nl, Pieter van den Hombergh p.vandenhombergh@fontys.nl
  • Method Details

    • getPriority

      Priority getPriority()
      Get the priority of this appointment.
      Specified by:
      getPriority in interface AppointmentData
      Returns:
      Priority.
    • getAppointmentData

      AppointmentData getAppointmentData()
      Get the appointment data for this appointment.
      Returns:
      the data
    • getRequest

      AppointmentRequest getRequest()
      Get the request that led to this appointment.
      Returns:
      the request.
    • toString

      String toString()
      Override the default toString. toString() returns startTime, endTime, description and priority like: "2020-09-12 14:00 - 15:55 ALDA Lesson (HIGH)" This will make your testing and debugging life so much easier.
      Specified by:
      toString in interface AppointmentData
      Overrides:
      toString in class Object
      Returns:
      String representation of Appointment.
    • equals

      boolean equals(Object obj)
      Defines equality. Must be based on all fields of this class.
      Specified by:
      equals in interface AppointmentData
      Overrides:
      equals in class Object
      Parameters:
      obj - the other object to check equality with
      Returns:
      true if the two appointments are equal
    • hashCode

      int hashCode()
      Calculate a hash code value for the object.
      Specified by:
      hashCode in interface AppointmentData
      Overrides:
      hashCode in class Object
      Returns:
      hashCode for this object