- All Implemented Interfaces:
Serializable
,Comparable<TimePreference>
,Constable
Strategy to find a Time slot to add an Appointment.
- Author:
- Richard van den Ham
r.vandenham@fontys.nl
, Pieter van den Homberghp.vandenhombergh@fontys.nl
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionPlan the appointment as early as possible on a day.Plan as early as possible after a given time.Plan as late as possible on a day.Plan as late as possible before a given time.In case no time preference is specified, this is the default. -
Method Summary
Modifier and TypeMethodDescriptionstatic TimePreference
Returns the enum constant of this class with the specified name.static TimePreference[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
EARLIEST
Plan the appointment as early as possible on a day. This preference can work without a fixed time. -
LATEST
Plan as late as possible on a day. This preference can work without a fixed time. -
UNSPECIFIED
In case no time preference is specified, this is the default. In general cases this will fall back to EARLIEST -
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
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
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
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 nameNullPointerException
- if the argument is null
-