Class Mins
- java.lang.Object
-
- gaia.cu9.ari.gaiaorbit.util.gaia.time.ConcreteDuration
-
- gaia.cu9.ari.gaiaorbit.util.gaia.time.Mins
-
- All Implemented Interfaces:
Duration
,java.io.Serializable
public class Mins extends ConcreteDuration implements java.io.Serializable
A finite number of minutes. 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
-
-
Field Summary
-
Fields inherited from class gaia.cu9.ari.gaiaorbit.util.gaia.time.ConcreteDuration
value
-
Fields inherited from interface gaia.cu9.ari.gaiaorbit.util.gaia.time.Duration
DAYS_PER_JULIAN_YEAR, HOURS_PER_DAY, HOURS_PER_JULIAN_YEAR, HOURS_PER_REV, MINS_PER_DAY, MINS_PER_HOUR, MINS_PER_JULIAN_YEAR, MINS_PER_REV, NS_PER_DAY, NS_PER_DAY_L, NS_PER_HOUR, NS_PER_HOUR_L, NS_PER_JULIAN_YEAR, NS_PER_JULIAN_YEAR_L, NS_PER_MIN, NS_PER_MIN_L, NS_PER_REV, NS_PER_REV_L, NS_PER_SEC, REVS_PER_DAY, REVS_PER_JULIAN_YEAR, SECS_PER_DAY, SECS_PER_HOUR, SECS_PER_JULIAN_YEAR, SECS_PER_MIN, SECS_PER_REV
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Duration
add(Duration d)
Add a duration to this onedouble
asDays()
static double
asDays(double mins)
double
asHours()
static double
asHours(double mins)
double
asJulianYears()
static double
asJulianYears(double mins)
double
asMins()
long
asNanoSecs()
static long
asNanoSecs(double mins)
double
asRevs()
static double
asRevs(double mins)
double
asSecs()
static double
asSecs(double mins)
Mins
clone()
Duration
set(Duration d)
Set this duration to a new given oneDuration
sub(Duration d)
Subtract a duration from this one-
Methods inherited from class gaia.cu9.ari.gaiaorbit.util.gaia.time.ConcreteDuration
getScale, isLongerThan, mult, negate, setScale
-
-
-
-
Method Detail
-
set
public Duration set(Duration d)
Description copied from interface:Duration
Set this duration to a new given one- Specified by:
set
in interfaceDuration
- Parameters:
d
- duration to set this one to- Returns:
- updated object
- See Also:
Duration.set(Duration)
-
asNanoSecs
public long asNanoSecs()
- Specified by:
asNanoSecs
in interfaceDuration
- Returns:
- duration expressed in ns
- See Also:
Duration.asNanoSecs()
-
asNanoSecs
public static long asNanoSecs(double mins)
- Parameters:
mins
- Time in mins to convert- Returns:
- Minutes expressed in nanoSec
-
asSecs
public double asSecs()
- Specified by:
asSecs
in interfaceDuration
- Returns:
- duration expressed in s
- See Also:
Duration.asSecs()
-
asSecs
public static double asSecs(double mins)
- Parameters:
mins
- Time in mins to convert- Returns:
- Mins expressed in secs
-
asMins
public double asMins()
- Specified by:
asMins
in interfaceDuration
- Returns:
- duration expressed in min
- See Also:
Duration.asMins()
-
asHours
public double asHours()
- Specified by:
asHours
in interfaceDuration
- Returns:
- duration expressed in h
- See Also:
Duration.asHours()
-
asHours
public static double asHours(double mins)
- Parameters:
mins
- Time in mins to convert- Returns:
- Mins expressed in hours
-
asRevs
public double asRevs()
- Specified by:
asRevs
in interfaceDuration
- Returns:
- duration expressed in revolutions
- See Also:
Duration.asRevs()
-
asRevs
public static double asRevs(double mins)
- Parameters:
mins
- Time in mins to convert- Returns:
- Mins expressed in revs
-
asDays
public double asDays()
- Specified by:
asDays
in interfaceDuration
- Returns:
- number of ns expressed days
- See Also:
Duration.asDays()
-
asDays
public static double asDays(double mins)
- Parameters:
mins
- Time in mins to convert- Returns:
- Mins expressed in days
-
asJulianYears
public double asJulianYears()
- Specified by:
asJulianYears
in interfaceDuration
- Returns:
- duration expressed in Julian years
- See Also:
Duration.asJulianYears()
-
asJulianYears
public static double asJulianYears(double mins)
- Parameters:
mins
- Time in mins to convert- Returns:
- Mins expressed in JulianYears
-
add
public Duration add(Duration d)
Description copied from interface:Duration
Add a duration to this one- Specified by:
add
in interfaceDuration
- 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 interfaceDuration
- Parameters:
d
- amount of time to subtract- Returns:
- updated object
- See Also:
Duration.sub(Duration)
-
clone
public Mins clone()
- Overrides:
clone
in classjava.lang.Object
- See Also:
Object.clone()
-
-