Class JulianYears

  • All Implemented Interfaces:
    Duration, java.io.Serializable

    public class JulianYears
    extends ConcreteDuration
    implements java.io.Serializable
    A finite number of years. There are two implementations provided of the conversions methods one as object interface, where an object of the current class has to be instantiated. The oder implementation is provided as static class methods. Performance tests of both implementations have come up with a performance improvement of 20% of the static methods compared with the object methods.
    See Also:
    gaiasky.util.gaia.time.test.DurationTest, Serialized Form
    • Constructor Detail

      • JulianYears

        public JulianYears()
        Default constructor
      • JulianYears

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

      • 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
      • clone

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