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 (1e-3) 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 (1e-6) 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 (1e-9) 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 (1e-12) 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 (1e-15) 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 (1e-18) 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 (1e-21) 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 (1e-24) of a second. This is getting quite small.
      Returns:
      the number of yoctoseconds
      Compliance:
      mandatory - This method must be implemented.
    • getRontoseconds

      BigDecimal getRontoseconds()
      Gets the number of rontoseconds. A rontoosecond is one octillionth (1e-27) of a second.
      Returns:
      the number of rontoseconds
      Compliance:
      mandatory - This method must be implemented.
    • getQuectoseconds

      BigDecimal getQuectoseconds()
      Gets the number of quectoseconds. A quectosecond is one nonillionth (1e-30) of a second.
      Returns:
      the number of quectoseconds
      Compliance:
      mandatory - This method must be implemented.
    • getMilliquectoseconds

      BigDecimal getMilliquectoseconds()
      Gets the number of milliquectoseconds. A milliquectosecond is one decillionth (1e-33) of a second.
      Returns:
      the number of milliquectoseconds
      Compliance:
      mandatory - This method must be implemented.
    • getMicroquectoseconds

      BigDecimal getMicroquectoseconds()
      Gets the number of microquectoseconds. A microquectosecond is one undecillionth (1e-36) of a second.
      Returns:
      the number of microquectoseconds
      Compliance:
      mandatory - This method must be implemented.
    • getPlanckseconds

      BigDecimal getPlanckseconds()
      Gets the number of plancksseconds. A plancksecond is 53.91247 quattuordecillionths (5.391247e-44) of a second.
      Returns:
      the number of planckseconds
      Compliance:
      mandatory - This method must be implemented.
    • getGranularity

      DateTimeResolution getGranularity()
      Gets the granularity of this duration. The granularity indicates the resolution of the clock (the tick). 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.