Class JulianYears

java.lang.Object
gaiasky.util.gaia.time.ConcreteDuration
gaiasky.util.gaia.time.JulianYears
All Implemented Interfaces:
Duration, Serializable

public class JulianYears extends ConcreteDuration implements Serializable
See Also:
  • Constructor Details

    • JulianYears

      public JulianYears()
      Default constructor
    • JulianYears

      public JulianYears(double years)
      Construct object
      Parameters:
      years - number of years
  • Method Details

    • asNanoSecs

      public static long asNanoSecs(double years)
      Parameters:
      years - Time in JulianYears to convert
      Returns:
      JulianYears expressed in nanoSec
    • asSecs

      public static double asSecs(double years)
      Parameters:
      years - Time in JulianYears to convert
      Returns:
      JulianYears expressed in secs
    • asMins

      public static double asMins(double years)
      Parameters:
      years - JulianYears in years to convert
      Returns:
      JulianYears expressed in mins
    • asHours

      public static double asHours(double years)
      Parameters:
      years - Time in JulianYears to convert
      Returns:
      JulianYears expressed in hours.
    • asRevs

      public static double asRevs(double years)
      Parameters:
      years - Time in JulianYears to convert
      Returns:
      JulianYears expressed in revs.
    • asDays

      public static double asDays(double years)
      Parameters:
      years - Time in JulianYears ton convert
      Returns:
      JulianYears expressed in days
    • set

      public Duration set(Duration d)
      Description copied from interface: Duration
      Set this duration to a new given one
      Specified by:
      set in interface Duration
      Parameters:
      d - duration to set this one to
      Returns:
      updated object
      See Also:
    • asNanoSecs

      public long asNanoSecs()
      Specified by:
      asNanoSecs in interface Duration
      Returns:
      duration expressed in ns
      See Also:
    • asSecs

      public double asSecs()
      Specified by:
      asSecs in interface Duration
      Returns:
      duration expressed in s
      See Also:
    • asMins

      public double asMins()
      Specified by:
      asMins in interface Duration
      Returns:
      duration expressed in min
      See Also:
    • asHours

      public double asHours()
      Specified by:
      asHours in interface Duration
      Returns:
      duration expressed in h
      See Also:
    • asRevs

      public double asRevs()
      Specified by:
      asRevs in interface Duration
      Returns:
      duration expressed in revolutions
      See Also:
    • asDays

      public double asDays()
      Specified by:
      asDays in interface Duration
      Returns:
      number of ns expressed days
      See Also:
    • asJulianYears

      public double asJulianYears()
      Specified by:
      asJulianYears in interface Duration
      Returns:
      duration expressed in Julian years
      See Also:
    • add

      public Duration add(Duration d)
      Description copied from interface: Duration
      Add a duration to this one
      Specified by:
      add in interface Duration
      Parameters:
      d - amount of time to add
      Returns:
      updated object
      See Also:
    • sub

      public Duration sub(Duration d)
      Description copied from interface: Duration
      Subtract a duration from this one
      Specified by:
      sub in interface Duration
      Parameters:
      d - amount of time to subtract
      Returns:
      updated object
      See Also:
    • clone

      public JulianYears clone()
      Overrides:
      clone in class Object
      See Also: