Class Interval
java.lang.Object
io.camunda.zeebe.model.bpmn.util.time.Interval
- All Implemented Interfaces:
TemporalAmount
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanlongget(TemporalUnit unit) Duration.get(TemporalUnit)only acceptsChronoUnit.SECONDSandChronoUnit.NANOS, so for any other units, this call is delegated toPeriod.get(TemporalUnit), though it could easily be the other way around.getStart()getUnits()inthashCode()static IntervalOnly supports a subset of ISO8601, combining start, period and duration.subtractFrom(Temporal temporal) longtoEpochMilli(long fromEpochMilli) toString()Creates a new interval with the specified start instant.
-
Constructor Details
-
Interval
-
Interval
-
Interval
-
Interval
-
-
Method Details
-
getPeriod
-
getDuration
-
getStart
-
toEpochMilli
public long toEpochMilli(long fromEpochMilli) -
withStart
Creates a new interval with the specified start instant.- Parameters:
start- the start instant for the new interval- Returns:
- a new interval from this interval and the specified start
-
get
Duration.get(TemporalUnit)only acceptsChronoUnit.SECONDSandChronoUnit.NANOS, so for any other units, this call is delegated toPeriod.get(TemporalUnit), though it could easily be the other way around.- Specified by:
getin interfaceTemporalAmount- Parameters:
unit- theTemporalUnitfor which to return the value- Returns:
- the long value of the unit
- Throws:
UnsupportedTemporalTypeException- if the unit is not supported
-
getUnits
- Specified by:
getUnitsin interfaceTemporalAmount
-
addTo
- Specified by:
addToin interfaceTemporalAmount
-
subtractFrom
- Specified by:
subtractFromin interfaceTemporalAmount
-
hashCode
public int hashCode() -
equals
-
toString
-
parse
Only supports a subset of ISO8601, combining start, period and duration.- Parameters:
text- ISO8601 conforming interval expression- Returns:
- parsed interval
-