Class RepeatingInterval

  • All Implemented Interfaces:
    Timer

    public class RepeatingInterval
    extends Object
    implements Timer
    • Constructor Detail

      • RepeatingInterval

        public RepeatingInterval​(int repetitions,
                                 Interval interval)
    • Method Detail

      • getRepetitions

        public int getRepetitions()
        Specified by:
        getRepetitions in interface Timer
      • getDueDate

        public long getDueDate​(long fromEpochMillis)
        Specified by:
        getDueDate in interface Timer
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • parse

        public static RepeatingInterval parse​(String text,
                                              String intervalDesignator)
        Parses a repeating interval as two parts, separated by a given interval designator.

        The first part describes how often the interval should be repeated, and the second part is the interval itself; see Interval.parse(String) for more on parsing the interval.

        The repeating part is conform to the following format: R[0-9]*

        If given an interval with, e.g. the interval designator is not present in the text, it is assumed implicitly that the interval is meant to be repeated infinitely.

        Parameters:
        text - text to parse
        intervalDesignator - the separator between the repeating and interval texts
        Returns:
        a RepeatingInterval based on the given text