Enum Class TimePreference

java.lang.Object
java.lang.Enum<TimePreference>
appointmentplanner.api.TimePreference
All Implemented Interfaces:
Serializable, Comparable<TimePreference>, Constable

public enum TimePreference extends Enum<TimePreference>
Strategy to find a Time slot to add an Appointment.
Author:
Richard van den Ham r.vandenham@fontys.nl, Pieter van den Hombergh p.vandenhombergh@fontys.nl
  • Enum Constant Details

    • EARLIEST

      public static final TimePreference EARLIEST
      Plan the appointment as early as possible on a day. This preference can work without a fixed time.
    • LATEST

      public static final TimePreference LATEST
      Plan as late as possible on a day. This preference can work without a fixed time.
    • UNSPECIFIED

      public static final TimePreference UNSPECIFIED
      In case no time preference is specified, this is the default. In general cases this will fall back to EARLIEST
    • LATEST_BEFORE

      public static final TimePreference LATEST_BEFORE
      Plan as late as possible before a given time. This preference cannot be used without a fixed time. NOTE: this preference behaves differently from other preferences, as it is the only preference where the appointment should not be planned on the fixed time if possible. The entire appointment should fit BEFORE the fixed time (so the appointment should end before the fixed time).
    • EARLIEST_AFTER

      public static final TimePreference EARLIEST_AFTER
      Plan as early as possible after a given time. This preference cannot be used without a fixed time. NOTE: if planning is possible at the given time, then that is a valid earliest after.
  • Method Details

    • values

      public static TimePreference[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static TimePreference valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null