Class TimeOfDaySchedule


  • public class TimeOfDaySchedule
    extends java.lang.Object
    • Method Detail

      • toSymbolicTime

        protected long toSymbolicTime​(long absoluteTime)
      • toSymbolicTime

        protected long toSymbolicTime​(org.joda.time.DateTime absoluteTime)
      • toAbsoluteTime

        protected long toAbsoluteTime​(org.joda.time.DateTime baseTime,
                                      long symbolicTime,
                                      boolean nextDay)
        Takes the symbolic time and converts it back to an absolute time based on the baseTime.

        It basically works by converting the base to symbolic, which is essentially how the calculation was made, and then adding the diff of the symbolic times to the base.

      • toAbsoluteTime

        protected long toAbsoluteTime​(org.joda.time.DateTime baseTime,
                                      long symbolicTime,
                                      boolean nextDay,
                                      long dstOffset)
      • isCovered

        public boolean isCovered​(long absoluteTime)
      • nextEvent

        public TimeOfDaySchedule.ScheduledTime nextEvent​(long absoluteTime)
        Returns the next scheduled event for the time, or the time event covering the specified time. If the time is covered, the returned time will be aligned to the range alignment, if that was specified during the parsing.
      • parse

        public static TimeOfDaySchedule parse​(java.lang.String value)
                                       throws java.lang.Exception
        Throws:
        java.lang.Exception
      • parse

        public static TimeOfDaySchedule parse​(java.lang.String value,
                                              int alignmentMS)
                                       throws java.lang.Exception
        Throws:
        java.lang.Exception
      • parsePart

        protected static TimeOfDaySchedule.SymbolicTime parsePart​(java.lang.String value)
                                                           throws java.lang.Exception
        Throws:
        java.lang.Exception
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object