Class Hours

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

    public class Hours
    extends ConcreteDuration
    implements java.io.Serializable
    A finite number of hours 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:
    Serialized Form
    • Constructor Detail

      • Hours

        public Hours()
        Default constructor
      • Hours

        public Hours​(double hours)
        Construct object
        Parameters:
        hours - number of hours
    • Method Detail

      • asNanoSecs

        public static long asNanoSecs​(double hours)
        Parameters:
        hours - The time in hours to convert.
        Returns:
        hours expressed in nanosecs
      • asSecs

        public static double asSecs​(double hours)
        Parameters:
        hours - The time in hours to convert.
        Returns:
        hours expressed in secs
      • asMins

        public static double asMins​(double hours)
        Parameters:
        hours - The time in hours to convert
        Returns:
        hours expressed in mins
      • asRevs

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

        public static double asDays​(double hours)
        Parameters:
        hours - Time in hours to convert.
        Returns:
        hours expressed in days
      • asJulianYears

        public static double asJulianYears​(double hours)
        Parameters:
        hours - Time in hours to convert.
        Returns:
        hours expressed in JulianYears
      • clone

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