Package io.openems.common.timedata
Class DurationUnit
java.lang.Object
io.openems.common.timedata.DurationUnit
- All Implemented Interfaces:
TemporalUnit
-
Method Summary
Modifier and TypeMethodDescription<R extends Temporal>
RaddTo
(R temporal, long amount) long
boolean
boolean
boolean
static DurationUnit
Get theDurationUnit
forDuration
.static DurationUnit
ofDays
(long days) Get theDurationUnit
of days.static DurationUnit
ofHours
(long hours) Get theDurationUnit
of hours.static DurationUnit
ofMillis
(long millis) Get theDurationUnit
of millis.static DurationUnit
ofMinutes
(long minutes) Get theDurationUnit
of minutes.static DurationUnit
ofNanos
(long nanos) Get theDurationUnit
of nanos.static DurationUnit
ofSeconds
(long seconds) Get theDurationUnit
of seconds.toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.time.temporal.TemporalUnit
isSupportedBy
-
Method Details
-
of
Get theDurationUnit
forDuration
.- Parameters:
duration
- theDuration
- Returns:
- the
DurationUnit
-
ofDays
Get theDurationUnit
of days.- Parameters:
days
- the amount days- Returns:
- the
DurationUnit
-
ofHours
Get theDurationUnit
of hours.- Parameters:
hours
- the amount hours- Returns:
- the
DurationUnit
-
ofMinutes
Get theDurationUnit
of minutes.- Parameters:
minutes
- the amount minutes- Returns:
- the
DurationUnit
-
ofSeconds
Get theDurationUnit
of seconds.- Parameters:
seconds
- the amount seconds- Returns:
- the
DurationUnit
-
ofMillis
Get theDurationUnit
of millis.- Parameters:
millis
- the amount millis- Returns:
- the
DurationUnit
-
ofNanos
Get theDurationUnit
of nanos.- Parameters:
nanos
- the amount nanos- Returns:
- the
DurationUnit
-
getDuration
- Specified by:
getDuration
in interfaceTemporalUnit
-
isDurationEstimated
public boolean isDurationEstimated()- Specified by:
isDurationEstimated
in interfaceTemporalUnit
-
isDateBased
public boolean isDateBased()- Specified by:
isDateBased
in interfaceTemporalUnit
-
isTimeBased
public boolean isTimeBased()- Specified by:
isTimeBased
in interfaceTemporalUnit
-
addTo
- Specified by:
addTo
in interfaceTemporalUnit
-
between
- Specified by:
between
in interfaceTemporalUnit
-
toString
- Specified by:
toString
in interfaceTemporalUnit
- Overrides:
toString
in classObject
-