Package org.ojalgo.type
Class CalendarDateDuration
java.lang.Object
org.ojalgo.type.CalendarDateDuration
- All Implemented Interfaces:
Comparable<CalendarDateDuration>
,TemporalAdjuster
,TemporalAmount
,Structure1D.IndexMapper<CalendarDate>
,CalendarDate.Resolution
,ComparableNumber<CalendarDateDuration>
,NumberDefinition
public final class CalendarDateDuration
extends Object
implements TemporalAmount, CalendarDate.Resolution, ComparableNumber<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.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlong
addTo
(long epochMilli) Will increment the input epochMilli by the size/duration of this timeline resolution.adjustInto
(Temporal temporal) int
compareTo
(CalendarDateDuration reference) convertTo
(CalendarDateUnit newUnit) double
boolean
float
long
get
(TemporalUnit unit) getUnits()
int
hashCode()
int
intValue()
long
(package private) static CalendarDateDuration
of
(long nanos) subtractFrom
(Temporal temporal) long
The size/duration of a timeline resolution "unit".long
toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.ojalgo.type.CalendarDate.Resolution
adjustInto, adjustInto, toIndex, toKey
Methods inherited from interface org.ojalgo.type.NumberDefinition
booleanValue, byteValue, shortValue
Methods inherited from interface org.ojalgo.structure.Structure1D.IndexMapper
next, previous
-
Field Details
-
measure
public final double measure -
unit
-
-
Constructor Details
-
CalendarDateDuration
-
CalendarDateDuration
CalendarDateDuration()
-
-
Method Details
-
of
-
addTo
public long addTo(long epochMilli) Description copied from interface:CalendarDate.Resolution
Will increment the input epochMilli by the size/duration of this timeline resolution.- Specified by:
addTo
in interfaceCalendarDate.Resolution
-
addTo
- Specified by:
addTo
in interfaceTemporalAmount
-
adjustInto
- Specified by:
adjustInto
in interfaceTemporalAdjuster
-
compareTo
- Specified by:
compareTo
in interfaceComparable<CalendarDateDuration>
-
convertTo
-
doubleValue
public double doubleValue()- Specified by:
doubleValue
in interfaceNumberDefinition
-
equals
-
floatValue
public float floatValue()- Specified by:
floatValue
in interfaceNumberDefinition
-
get
- Specified by:
get
in interfaceTemporalAmount
-
getUnits
- Specified by:
getUnits
in interfaceTemporalAmount
-
hashCode
public int hashCode() -
intValue
public int intValue()- Specified by:
intValue
in interfaceNumberDefinition
-
longValue
public long longValue()- Specified by:
longValue
in interfaceNumberDefinition
-
subtractFrom
- Specified by:
subtractFrom
in interfaceTemporalAmount
-
toDurationInMillis
public long toDurationInMillis()Description copied from interface:CalendarDate.Resolution
The size/duration of a timeline resolution "unit".- Specified by:
toDurationInMillis
in interfaceCalendarDate.Resolution
-
toDurationInNanos
public long toDurationInNanos()- Specified by:
toDurationInNanos
in interfaceCalendarDate.Resolution
-
toString
-