Class RepeatingInterval

java.lang.Object
io.camunda.zeebe.model.bpmn.util.time.RepeatingInterval
All Implemented Interfaces:
Timer

public class RepeatingInterval extends Object implements Timer
  • Field Details

  • Constructor Details

    • RepeatingInterval

      public RepeatingInterval(int repetitions, Interval interval)
  • Method Details

    • getInterval

      public Interval getInterval()
      Specified by:
      getInterval in interface Timer
    • 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
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • parse

      public static RepeatingInterval parse(String text)
    • 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