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 TypeMethodDescriptionlongaddTo(long epochMilli) Will increment the input epochMilli by the size/duration of this timeline resolution.adjustInto(Temporal temporal) intcompareTo(CalendarDateDuration reference) convertTo(CalendarDateUnit newUnit) doublebooleanfloatlongget(TemporalUnit unit) getUnits()inthashCode()intintValue()long(package private) static CalendarDateDurationof(long nanos) subtractFrom(Temporal temporal) longThe size/duration of a timeline resolution "unit".longtoString()Methods inherited from interface CalendarDate.Resolution
adjustInto, adjustInto, toIndex, toKeyMethods inherited from interface NumberDefinition
booleanValue, byteValue, shortValueMethods inherited from interface 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.ResolutionWill increment the input epochMilli by the size/duration of this timeline resolution.- Specified by:
addToin interfaceCalendarDate.Resolution
-
addTo
- Specified by:
addToin interfaceTemporalAmount
-
adjustInto
- Specified by:
adjustIntoin interfaceTemporalAdjuster
-
compareTo
- Specified by:
compareToin interfaceComparable<CalendarDateDuration>
-
convertTo
-
doubleValue
public double doubleValue()- Specified by:
doubleValuein interfaceNumberDefinition
-
equals
-
floatValue
public float floatValue()- Specified by:
floatValuein interfaceNumberDefinition
-
get
- Specified by:
getin interfaceTemporalAmount
-
getUnits
- Specified by:
getUnitsin interfaceTemporalAmount
-
hashCode
-
intValue
public int intValue()- Specified by:
intValuein interfaceNumberDefinition
-
longValue
public long longValue()- Specified by:
longValuein interfaceNumberDefinition
-
subtractFrom
- Specified by:
subtractFromin interfaceTemporalAmount
-
toDurationInMillis
public long toDurationInMillis()Description copied from interface:CalendarDate.ResolutionThe size/duration of a timeline resolution "unit".- Specified by:
toDurationInMillisin interfaceCalendarDate.Resolution
-
toDurationInNanos
public long toDurationInNanos()- Specified by:
toDurationInNanosin interfaceCalendarDate.Resolution
-
toString
-