Package com.dna.jopt.member.unit.hours
Interface IDutyHours
- All Superinterfaces:
Comparable<IDutyHours>,Serializable
- All Known Subinterfaces:
IOpeningHours,IWorkingHours
- All Known Implementing Classes:
AbstractDutyHours,OpeningHours,WorkingHours
This interface defines the methods to set the work schedules
IOpeningHours and IWorkingHoursfor all the different INode and IResource.
While both above mentioned Interfaces extend this Interface, IWorkingHours is used for
IResource and IOpeningHours is used for INode.
- Since:
- 28/09/2018
- Version:
- 04/10/2019
- Author:
- DNA
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumThis enables to clearly distinguish between several instances ofIDutyHours, sinceWorkingHoursandOpeningHourshave their ownflavour. -
Method Summary
Modifier and TypeMethodDescriptioncopy()Returns the hours asWorkingHours(this.getBegin(), this.getEnd(), this.getZoneId())orOpeningHours(this.getBegin(), this.getEnd(), this.getZoneId()).Gets theIDutyHours.DutyHoursFlavour.WOH_FLAVOUR, the default value isenum constant ordinal: 0.Gets the time window.booleanChecks if it is a preffered hour.voidsetIsPrefferedHour(boolean isPreffered) Sets the checks if is preffered hour.Methods inherited from interface java.lang.Comparable
compareTo
-
Method Details
-
getFlavour
IDutyHours.DutyHoursFlavour getFlavour()Gets theIDutyHours.DutyHoursFlavour.WOH_FLAVOUR, the default value isenum constant ordinal: 0.- Returns:
- the enum constant ordinal
-
copy
IDutyHours copy()Returns the hours asWorkingHours(this.getBegin(), this.getEnd(), this.getZoneId())orOpeningHours(this.getBegin(), this.getEnd(), this.getZoneId()). Further, properties are copied.- Returns:
- a copy of the Workinghours or the Openinghours
-
setIsPrefferedHour
void setIsPrefferedHour(boolean isPreffered) Sets the checks if is preffered hour.- Parameters:
isPreffered- the new checks if is prefferd hour
-
isPrefferedHour
boolean isPrefferedHour()Checks if it is a preffered hour.- Returns:
- true, if it is a preffered hour
-
getTimeWindow
TimeWindow getTimeWindow()Gets the time window.- Returns:
- the time window
-