public final class CalendarDateDuration extends Number implements TemporalAmount, CalendarDate.Resolution, Comparable<CalendarDateDuration>
Designed to complement CalendarDate. It is similar to Duration or Period, but supports a decimal/fractional measure. It has been retrofitted to implement the TemporalAmount interface.
CalendarDate,
CalendarDateUnit,
Serialized Form| Modifier and Type | Field and Description |
|---|---|
double |
measure |
CalendarDateUnit |
unit |
| Constructor and Description |
|---|
CalendarDateDuration(double aMeasure,
CalendarDateUnit aUnit) |
| Modifier and Type | Method and Description |
|---|---|
long |
addTo(long epochMilli)
Will increment the input epochMilli by the size/duration of this timeline resolution.
|
Temporal |
addTo(Temporal temporal) |
Temporal |
adjustInto(Temporal temporal) |
int |
compareTo(CalendarDateDuration reference) |
CalendarDateDuration |
convertTo(CalendarDateUnit newUnit) |
double |
doubleValue() |
boolean |
equals(Object obj) |
float |
floatValue() |
long |
get(TemporalUnit unit) |
List<TemporalUnit> |
getUnits() |
int |
hashCode() |
int |
intValue() |
long |
longValue() |
Temporal |
subtractFrom(Temporal temporal) |
long |
toDurationInMillis()
The size/duration of a timeline resolution "unit".
|
long |
toDurationInNanos() |
String |
toString() |
byteValue, shortValueclone, finalize, getClass, notify, notifyAll, wait, wait, waitadjustIntopublic final double measure
public final CalendarDateUnit unit
public CalendarDateDuration(double aMeasure,
CalendarDateUnit aUnit)
public long addTo(long epochMilli)
CalendarDate.ResolutionaddTo in interface CalendarDate.Resolutionpublic Temporal addTo(Temporal temporal)
addTo in interface TemporalAmountpublic Temporal adjustInto(Temporal temporal)
adjustInto in interface TemporalAdjusterpublic int compareTo(CalendarDateDuration reference)
compareTo in interface Comparable<CalendarDateDuration>public CalendarDateDuration convertTo(CalendarDateUnit newUnit)
public double doubleValue()
doubleValue in class Numberpublic float floatValue()
floatValue in class Numberpublic long get(TemporalUnit unit)
get in interface TemporalAmountpublic List<TemporalUnit> getUnits()
getUnits in interface TemporalAmountpublic Temporal subtractFrom(Temporal temporal)
subtractFrom in interface TemporalAmountpublic long toDurationInMillis()
CalendarDate.ResolutiontoDurationInMillis in interface CalendarDate.Resolutionpublic long toDurationInNanos()
toDurationInNanos in interface CalendarDate.ResolutionCopyright © 2019 Optimatika. All rights reserved.