Package io.zeebe.model.bpmn.util.time
Class Interval
- java.lang.Object
-
- io.zeebe.model.bpmn.util.time.Interval
-
- All Implemented Interfaces:
TemporalAmount
public class Interval extends Object implements TemporalAmount
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Temporal
addTo(Temporal temporal)
boolean
equals(Object o)
long
get(TemporalUnit unit)
Duration.get(TemporalUnit)
only acceptsChronoUnit.SECONDS
andChronoUnit.NANOS
, so for any other units, this call is delegated toPeriod.get(TemporalUnit)
, though it could easily be the other way around.Duration
getDuration()
Period
getPeriod()
List<TemporalUnit>
getUnits()
int
hashCode()
static Interval
parse(String text)
Only supports a subset of ISO8601, combining both period and duration.Temporal
subtractFrom(Temporal temporal)
long
toEpochMilli(long fromEpochMilli)
String
toString()
-
-
-
Method Detail
-
getPeriod
public Period getPeriod()
-
getDuration
public Duration getDuration()
-
toEpochMilli
public long toEpochMilli(long fromEpochMilli)
-
get
public long get(TemporalUnit unit)
Duration.get(TemporalUnit)
only acceptsChronoUnit.SECONDS
andChronoUnit.NANOS
, so for any other units, this call is delegated toPeriod.get(TemporalUnit)
, though it could easily be the other way around.- Specified by:
get
in interfaceTemporalAmount
- Parameters:
unit
- theTemporalUnit
for which to return the value- Returns:
- the long value of the unit
- Throws:
UnsupportedTemporalTypeException
- if the unit is not supported
-
getUnits
public List<TemporalUnit> getUnits()
- Specified by:
getUnits
in interfaceTemporalAmount
-
addTo
public Temporal addTo(Temporal temporal)
- Specified by:
addTo
in interfaceTemporalAmount
-
subtractFrom
public Temporal subtractFrom(Temporal temporal)
- Specified by:
subtractFrom
in interfaceTemporalAmount
-
-