Interface Duration

All Superinterfaces:
Comparable<Duration>, Duration, OsidPrimitive, OsidPrimitive, Serializable

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.

  • Method Details

    • getCalendarType

      Type getCalendarType()
      Gets the calendar type.
      Returns:
      the calendar type
      Compliance:
      mandatory - This method must be implemented.
    • getTimeType

      Type getTimeType()
      Gets the time type.
      Returns:
      the time type
      Compliance:
      mandatory - This method must be implemented.
    • getAeons

      BigDecimal getAeons()
      Gets the number of aeons. An aeon is 1B years.
      Returns:
      the number of aeons
      Compliance:
      mandatory - This method must be implemented.
    • getEpochs

      BigDecimal getEpochs()
      Gets the number of epochs. An epoch is 1M years.
      Returns:
      the number of epochs
      Compliance:
      mandatory - This method must be implemented.
    • getMillennia

      BigDecimal getMillennia()
      Gets the number of millennia. A millennium is 1,000 years.
      Returns:
      the number of millennia
      Compliance:
      mandatory - This method must be implemented.
    • getCenturies

      BigDecimal getCenturies()
      Gets the number of centuries.
      Returns:
      the number of centuries
      Compliance:
      mandatory - This method must be implemented.
    • getScores

      BigDecimal getScores()
      Gets the number of scores.
      Returns:
      the number of scores
      Compliance:
      mandatory - This method must be implemented.
    • getBluemoons

      BigDecimal getBluemoons()
      Gets the number of blue moons.
      Returns:
      the number of blue moons
      Compliance:
      mandatory - This method must be implemented.
    • getYears

      BigDecimal getYears()
      Gets the number of years.
      Returns:
      the number of years
      Compliance:
      mandatory - This method must be implemented.
    • getMonths

      BigDecimal getMonths()
      Gets the number of months.
      Returns:
      the number of months
      Compliance:
      mandatory - This method must be implemented.
    • getWeeks

      BigDecimal getWeeks()
      Gets the number of weeks.
      Returns:
      the number of weeks
      Compliance:
      mandatory - This method must be implemented.
    • getDays

      BigDecimal getDays()
      Gets the number of days.
      Returns:
      the number of days
      Compliance:
      mandatory - This method must be implemented.
    • getHours

      BigDecimal getHours()
      Gets the number of hours.
      Returns:
      the number of hours
      Compliance:
      mandatory - This method must be implemented.
    • getMinutes

      BigDecimal getMinutes()
      Gets the number of minutes.
      Returns:
      the number of minutes
      Compliance:
      mandatory - This method must be implemented.
    • getSeconds

      BigDecimal getSeconds()
      Gets the number of seconds.
      Returns:
      the number of seconds
      Compliance:
      mandatory - This method must be implemented.
    • getMilliseconds

      BigDecimal getMilliseconds()
      Gets the number of milliseconds. A millisecond is one thousandth of a second.
      Returns:
      the number of milliseconds
      Compliance:
      mandatory - This method must be implemented.
    • getMicroseconds

      BigDecimal getMicroseconds()
      Gets the number of microseconds. A microsecond is one millionth of a second.
      Returns:
      the number of micrseconds
      Compliance:
      mandatory - This method must be implemented.
    • getNanoseconds

      BigDecimal getNanoseconds()
      Gets the number of nanoseconds. A nanosecond is one billionth of a second.
      Returns:
      the number of nanoseconds
      Compliance:
      mandatory - This method must be implemented.
    • getPicoseconds

      BigDecimal getPicoseconds()
      Gets the number of picoseconds. A picosecond is one trillionth of a second.
      Returns:
      the number of picoseconds
      Compliance:
      mandatory - This method must be implemented.
    • getFemtoseconds

      BigDecimal getFemtoseconds()
      Gets the number of femtoseconds. A femtosecond is one quadrillionth of a second.
      Returns:
      the number of femtoseconds
      Compliance:
      mandatory - This method must be implemented.
    • getAttoseconds

      BigDecimal getAttoseconds()
      Gets the number of attoseconds. An attosecond is one quintillionth of a second.
      Returns:
      the number of attoseconds
      Compliance:
      mandatory - This method must be implemented.
    • getZeptoseconds

      BigDecimal getZeptoseconds()
      Gets the number of zeptoseconds. A zeptosecond is one sextillionth of a second.
      Returns:
      the number of zeptoseconds
      Compliance:
      mandatory - This method must be implemented.
    • getYoctoseconds

      BigDecimal getYoctoseconds()
      Gets the number of yoctoseconds. A yoctosecond is one septillionth of a second. This is getting quite small.
      Returns:
      the number of yoctoseconds
      Compliance:
      mandatory - This method must be implemented.
    • getXoxxoseconds

      BigDecimal getXoxxoseconds()
      Gets the number of xoxxoseconds. A xoxxosecond is one octillionth of a second. We're going with Rudy Rucker here.
      Returns:
      the number of xoxxoseconds
      Compliance:
      mandatory - This method must be implemented.
    • getWeebleseconds

      BigDecimal getWeebleseconds()
      Gets the number of weebleseconds. A weeblesecond is one nonillionth of a second.
      Returns:
      the number of weebleseconds
      Compliance:
      mandatory - This method must be implemented.
    • getVatoseconds

      BigDecimal getVatoseconds()
      Gets the number of vatoseconds. A vatosecond is one decillionth of a second.
      Returns:
      the number of vatoseconds
      Compliance:
      mandatory - This method must be implemented.
    • getUndaseconds

      BigDecimal getUndaseconds()
      Gets the number of undaseconds. An undasecond is one unadecillionth of a second.
      Returns:
      the number of undaseconds
      Compliance:
      mandatory - This method must be implemented.
    • getPlanckSeconds

      BigDecimal getPlanckSeconds()
      Gets the number of Planck sseconds. A Planck is 10 quattuordecillionths of a second.
      Returns:
      the number of planck seconds
      Compliance:
      mandatory - This method must be implemented.
    • getGranularity

      DateTimeResolution getGranularity()
      Gets the granularity of this duration. The granularity indicates the resolution of the clock. More precision than what is specified in this method cannot be inferred from the available data.
      Returns:
      the time units
      Compliance:
      mandatory - This method must be implemented.
    • getGranularityMultiplier

      long getGranularityMultiplier()
      If the granularity of the time equals getGranularity() , then the multiplier is 1. This method may return a different number when the granularity differs from one of the defined resolutions.
      Returns:
      granularity multiplier
      Compliance:
      mandatory - This method must be implemented.
    • definesUncertainty

      boolean definesUncertainty()
      Tests if uncertainty is defined for this time.
      Returns:
      true if uncertainty is defined, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getUncertaintyUnits

      DateTimeResolution getUncertaintyUnits()
      Gets the units of the uncertainty.
      Returns:
      units of the uncertainty
      Throws:
      IllegalStateException - definesUncertainty() is false
      Compliance:
      mandatory - This method must be implemented.
    • getUncertaintyMinus

      long getUncertaintyMinus()
      Gets the uncertainty of this time in the negative direction.
      Returns:
      the uncertainty under this value
      Throws:
      IllegalStateException - definesUncertainty() is false
      Compliance:
      mandatory - This method must be implemented.
    • getUncertaintyPlus

      long getUncertaintyPlus()
      Gets the uncertainty of this time in the positive direction.
      Returns:
      the uncertainty over this value
      Throws:
      IllegalStateException - definesUncertainty() is false
      Compliance:
      mandatory - This method must be implemented.