Package io.zeebe.model.bpmn.util.time
Class RepeatingInterval
- java.lang.Object
-
- io.zeebe.model.bpmn.util.time.RepeatingInterval
-
-
Field Summary
Fields Modifier and Type Field Description static int
INFINITE
static String
INTERVAL_DESGINATOR
-
Constructor Summary
Constructors Constructor Description RepeatingInterval(int repetitions, Interval interval)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
long
getDueDate(long fromEpochMillis)
Interval
getInterval()
int
getRepetitions()
int
hashCode()
static RepeatingInterval
parse(String text)
static RepeatingInterval
parse(String text, String intervalDesignator)
Parses a repeating interval as two parts, separated by a given interval designator.
-
-
-
Field Detail
-
INTERVAL_DESGINATOR
public static final String INTERVAL_DESGINATOR
- See Also:
- Constant Field Values
-
INFINITE
public static final int INFINITE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
RepeatingInterval
public RepeatingInterval(int repetitions, Interval interval)
-
-
Method Detail
-
getInterval
public Interval getInterval()
- Specified by:
getInterval
in interfaceTimer
-
getRepetitions
public int getRepetitions()
- Specified by:
getRepetitions
in interfaceTimer
-
getDueDate
public long getDueDate(long fromEpochMillis)
- Specified by:
getDueDate
in interfaceTimer
-
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 parseintervalDesignator
- the separator between the repeating and interval texts- Returns:
- a RepeatingInterval based on the given text
-
-