Class Revs

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

public class Revs
extends ConcreteDuration
implements java.io.Serializable
A finite number of revolutions 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 other implementation is provided as static class methods.
See Also:
Serialized Form
  • Constructor Details

    • Revs

      public Revs()
      Default constructor
    • Revs

      public Revs​(double revs)
      Construct object
      Parameters:
      revs - number of revs
  • Method Details

    • 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:
      Duration.set(Duration)
    • asNanoSecs

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

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

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

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

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

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

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

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

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

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

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

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

      public static double asJulianYears​(double revs)
      Parameters:
      revs - Time in revolutions to convert.
      Returns:
      revs expressed in JulianYears
    • 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:
      Duration.sub(Duration)
    • 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:
      Duration.sub(Duration)
    • clone

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