JNISpice
version 2.0.0

spice.basic
Class JEDTime

java.lang.Object
  extended by spice.basic.Time
      extended by spice.basic.JEDTime

public class JEDTime
extends Time

Class JEDime represents times as Julian ephemeris dates.

Version 1.0.0 22-DEC-2009 (NJB)


Constructor Summary
JEDTime(double JED)
          Construct a JEDTime from a double precision Julian ephemeris date having units of Julian days.
JEDTime(JEDTime t)
          Copy constructor: create a new JEDTime value from another.
JEDTime(Time t)
          Universal constructor: create a JEDTime from any Time instance.
 
Method Summary
 JEDTime add(Duration d)
          Add a Duration to a JEDTime.
 boolean equals(java.lang.Object obj)
          Test two JEDTimes for equality.
 double getDays()
          Get the scalar count of days stored in this JED instance.
 double getTDBSeconds()
          Express a JEDTime as a count of TDB seconds past J2000 TDB.
 int hashCode()
          Return hash code for a JEDTime object.
 JEDTime sub(Duration d)
          Subtract a Duration from a JEDTime.
 JEDDuration sub(Time t)
          Subtract a Time instance from this JEDTime, producing a JEDDuration.
 java.lang.String toString()
          Convert a JEDTime to a formatted time string using a default picture.
 java.lang.String toString(java.lang.String picture)
          Convert a JEDTime to a formatted time string using a format picture.
 java.lang.String toUTCString(java.lang.String format, int precision)
          Convert a JEDTime to a formatted time string using a format code and an integer precision level for fractional seconds.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JEDTime

public JEDTime(double JED)
Construct a JEDTime from a double precision Julian ephemeris date having units of Julian days.

Note that the input is a primitive type, so no semantic checking is possible. The user must ensure that the input value has the correct reference epoch and time system.


JEDTime

public JEDTime(JEDTime t)
Copy constructor: create a new JEDTime value from another.


JEDTime

public JEDTime(Time t)
        throws SpiceException
Universal constructor: create a JEDTime from any Time instance.

This constructor performs all supported time conversions that produce a result expressed as seconds past J2000 TDB.

Throws:
SpiceException
Method Detail

getDays

public double getDays()
Get the scalar count of days stored in this JED instance.


sub

public JEDDuration sub(Time t)
                throws SpiceException
Subtract a Time instance from this JEDTime, producing a JEDDuration.

Specified by:
sub in class Time
Throws:
SpiceException

add

public JEDTime add(Duration d)
            throws SpiceException
Add a Duration to a JEDTime.

Specified by:
add in class Time
Throws:
SpiceException

sub

public JEDTime sub(Duration d)
            throws SpiceException
Subtract a Duration from a JEDTime.

Specified by:
sub in class Time
Throws:
SpiceException

equals

public boolean equals(java.lang.Object obj)
Test two JEDTimes for equality.

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Return hash code for a JEDTime object. This method is overridden to support the overridden equals( Object ) method.

Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString(java.lang.String picture)
                          throws SpiceErrorException
Convert a JEDTime to a formatted time string using a format picture. The format picture may be any supported by the SPICE routine TIMOUT.

Throws:
SpiceErrorException

toUTCString

public java.lang.String toUTCString(java.lang.String format,
                                    int precision)
                             throws SpiceErrorException
Convert a JEDTime to a formatted time string using a format code and an integer precision level for fractional seconds.

Throws:
SpiceErrorException

toString

public java.lang.String toString()
Convert a JEDTime to a formatted time string using a default picture. Note: this method overrides Object's "toString" method, and as such cannot throw a SpiceErrorException. Instead, if a conversion error occurs, the associated message is returned.

Overrides:
toString in class java.lang.Object

getTDBSeconds

public double getTDBSeconds()
Express a JEDTime as a count of TDB seconds past J2000 TDB.

Specified by:
getTDBSeconds in class Time

JNISpice
version 2.0.0

JNISpice Alpha Test Version 2.0.0 28-JAN-2017 (NJB)