public interface Duration extends OsidPrimitive, Duration
The Duration
a length of time.
While a DateTime
represents a point on a calendar and a
tick on a clock, a Duration
represents a measurement. Each
of these methods returns the total absolute measurement in the specified
units.
Modifier and Type | Method and Description |
---|---|
boolean |
definesUncertainty()
Tests if uncertainty is defined for this time.
|
java.math.BigDecimal |
getAeons()
Gets the number of aeons.
|
java.math.BigDecimal |
getAttoseconds()
Gets the number of attoseconds.
|
java.math.BigDecimal |
getBluemoons()
Gets the number of blue moons.
|
Type |
getCalendarType()
Gets the calendar type.
|
java.math.BigDecimal |
getCenturies()
Gets the number of centuries.
|
java.math.BigDecimal |
getDays()
Gets the number of days.
|
java.math.BigDecimal |
getEpochs()
Gets the number of epochs.
|
java.math.BigDecimal |
getFemtoseconds()
Gets the number of femtoseconds.
|
DateTimeResolution |
getGranularity()
Gets the granularity of this duration.
|
long |
getGranularityMultiplier()
If the granularity of the time equals
getGranularity(),
then the multiplier is 1. |
java.math.BigDecimal |
getHours()
Gets the number of hours.
|
java.math.BigDecimal |
getMicroseconds()
Gets the number of microseconds.
|
java.math.BigDecimal |
getMillennia()
Gets the number of millennia.
|
java.math.BigDecimal |
getMilliseconds()
Gets the number of milliseconds.
|
java.math.BigDecimal |
getMinutes()
Gets the number of minutes.
|
java.math.BigDecimal |
getMonths()
Gets the number of months.
|
java.math.BigDecimal |
getNanoseconds()
Gets the number of nanoseconds.
|
java.math.BigDecimal |
getPicoseconds()
Gets the number of picoseconds.
|
java.math.BigDecimal |
getPlanckSeconds()
Gets the number of Planck sseconds.
|
java.math.BigDecimal |
getScores()
Gets the number of scores.
|
java.math.BigDecimal |
getSeconds()
Gets the number of seconds.
|
Type |
getTimeType()
Gets the time type.
|
long |
getUncertaintyMinus()
Gets the uncertainty of this time in the negative direction.
|
long |
getUncertaintyPlus()
Gets the uncertainty of this time in the positive direction.
|
DateTimeResolution |
getUncertaintyUnits()
Gets the units of the uncertainty.
|
java.math.BigDecimal |
getUndaseconds()
Gets the number of undaseconds.
|
java.math.BigDecimal |
getVatoseconds()
Gets the number of vatoseconds.
|
java.math.BigDecimal |
getWeebleseconds()
Gets the number of weebleseconds.
|
java.math.BigDecimal |
getWeeks()
Gets the number of weeks.
|
java.math.BigDecimal |
getXoxxoseconds()
Gets the number of xoxxoseconds.
|
java.math.BigDecimal |
getYears()
Gets the number of years.
|
java.math.BigDecimal |
getYoctoseconds()
Gets the number of yoctoseconds.
|
java.math.BigDecimal |
getZeptoseconds()
Gets the number of zeptoseconds.
|
compareTo, equals, getLowerBound, getUpperBound, hashCode, isExclusive, isGreater, isInclusive, isLess
toString
Type getCalendarType()
mandatory
- This method must be implemented. Type getTimeType()
mandatory
- This method must be implemented. java.math.BigDecimal getAeons()
mandatory
- This method must be implemented. java.math.BigDecimal getEpochs()
mandatory
- This method must be implemented. java.math.BigDecimal getMillennia()
mandatory
- This method must be implemented. java.math.BigDecimal getCenturies()
mandatory
- This method must be implemented. java.math.BigDecimal getScores()
mandatory
- This method must be implemented. java.math.BigDecimal getBluemoons()
mandatory
- This method must be implemented. java.math.BigDecimal getYears()
mandatory
- This method must be implemented. java.math.BigDecimal getMonths()
mandatory
- This method must be implemented. java.math.BigDecimal getWeeks()
mandatory
- This method must be implemented. java.math.BigDecimal getDays()
mandatory
- This method must be implemented. java.math.BigDecimal getHours()
mandatory
- This method must be implemented. java.math.BigDecimal getMinutes()
mandatory
- This method must be implemented. java.math.BigDecimal getSeconds()
mandatory
- This method must be implemented. java.math.BigDecimal getMilliseconds()
mandatory
- This method must be implemented. java.math.BigDecimal getMicroseconds()
mandatory
- This method must be implemented. java.math.BigDecimal getNanoseconds()
mandatory
- This method must be implemented. java.math.BigDecimal getPicoseconds()
mandatory
- This method must be implemented. java.math.BigDecimal getFemtoseconds()
mandatory
- This method must be implemented. java.math.BigDecimal getAttoseconds()
mandatory
- This method must be implemented. java.math.BigDecimal getZeptoseconds()
mandatory
- This method must be implemented. java.math.BigDecimal getYoctoseconds()
mandatory
- This method must be implemented. java.math.BigDecimal getXoxxoseconds()
mandatory
- This method must be implemented. java.math.BigDecimal getWeebleseconds()
mandatory
- This method must be implemented. java.math.BigDecimal getVatoseconds()
mandatory
- This method must be implemented. java.math.BigDecimal getUndaseconds()
mandatory
- This method must be implemented. java.math.BigDecimal getPlanckSeconds()
mandatory
- This method must be implemented. DateTimeResolution getGranularity()
mandatory
- This method must be implemented. long getGranularityMultiplier()
getGranularity(),
then the multiplier is 1. This method may return a different number
when the granularity differs from one of the defined resolutions.mandatory
- This method must be implemented. boolean definesUncertainty()
true
if uncertainty is defined, false
otherwisemandatory
- This method must be implemented. DateTimeResolution getUncertaintyUnits()
IllegalStateException
- definesUncertainty()
is false
mandatory
- This method must be implemented. long getUncertaintyMinus()
IllegalStateException
- definesUncertainty()
is false
mandatory
- This method must be implemented. long getUncertaintyPlus()
IllegalStateException
- definesUncertainty()
is false
mandatory
- This method must be implemented.