Class AbstractDutyHours

java.lang.Object
com.dna.jopt.member.unit.hours.AbstractDutyHours
All Implemented Interfaces:
IDutyHours, Serializable, Comparable<IDutyHours>
Direct Known Subclasses:
OpeningHours, WorkingHours

public abstract class AbstractDutyHours extends Object implements IDutyHours
See Also:
  • Constructor Details

    • AbstractDutyHours

      public AbstractDutyHours(TimeWindow window)
    • AbstractDutyHours

      public AbstractDutyHours(Instant hoursBegin, Instant hoursEnd, ZoneId zoneId)
      Instantiates a new abstract duty hours.
      Parameters:
      hoursBegin - the hours begin
      hoursEnd - the hours end
      zoneId - the zone id
    • AbstractDutyHours

      public AbstractDutyHours(ZonedDateTime hoursBegin, ZonedDateTime hoursEnd)
    • AbstractDutyHours

      public AbstractDutyHours(long hoursBeginMillis, long hoursEndMillis, ZoneId zoneId)
    • AbstractDutyHours

      @Deprecated public AbstractDutyHours(GregorianCalendar hoursBegin, GregorianCalendar hoursEnd)
      Deprecated.
    • AbstractDutyHours

      @Deprecated public AbstractDutyHours(LocalDateTime hoursBegin, LocalDateTime hoursEnd)
      Deprecated.
    • AbstractDutyHours

      @Deprecated public AbstractDutyHours(Instant hoursBegin, Instant hoursEnd)
      Deprecated.
    • AbstractDutyHours

      @Deprecated public AbstractDutyHours(long hoursBeginMillis, long hoursEndMillis)
      Deprecated.
  • Method Details

    • getTimeWindow

      public TimeWindow getTimeWindow()
      Description copied from interface: IDutyHours
      Gets the time window.
      Specified by:
      getTimeWindow in interface IDutyHours
      Returns:
      the time window
    • compareTo

      public int compareTo(IDutyHours o)
      Specified by:
      compareTo in interface Comparable<IDutyHours>
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • setIsPrefferedHour

      public void setIsPrefferedHour(boolean isPreffered)
      Description copied from interface: IDutyHours
      Sets the checks if is preffered hour.
      Specified by:
      setIsPrefferedHour in interface IDutyHours
      Parameters:
      isPreffered - the new checks if is prefferd hour
    • isPrefferedHour

      public boolean isPrefferedHour()
      Description copied from interface: IDutyHours
      Checks if it is a preffered hour.
      Specified by:
      isPrefferedHour in interface IDutyHours
      Returns:
      true, if it is a preffered hour