|
JNISpice version 2.0.0 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectspice.basic.Body
public class Body
Class Body is used to represent identities of ephemeris objects.
This class takes the place of integer ID codes and body names used by subroutine interfaces in SPICELIB and CSPICE. However, body names and codes are still used to construct Body objects: either a name or NAIF integer code must be supplied in order to construct a Body.
Additionally, this class provides API methods for retrieving certain data associated with ephemeris objects. In particular, PCK data associated with bodies, such as radii of triaxial ellipsoid shape models, once loaded into the kernel database, may be retrieved via methods of this class.
See the documentation for class
StateRecord
for a usage example.
The copy constructor now uses the stored IDMap instance's deepCopy method, rather than converting the stored instance to an integer ID and using that to create a new instance.
Removed spurious check for ID code 0 from method
getIDCode()
.
Constructor Summary | |
---|---|
Body(Body b)
Construct a Body from another Body. |
|
Body(int code)
Construct a Body from an integer code. |
|
Body(java.lang.String name)
Construct a Body from a body name. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
Test two Bodies for equality. |
int |
getIDCode()
Return NAIF ID code associated with a Body. |
java.lang.String |
getName()
Return name associated with a Body. |
double[] |
getValues(java.lang.String item)
Return the double precision values of a kernel variable associated with this Body instance, where the kernel variable name has the form |
int |
hashCode()
Return a hash code for this Body. |
java.lang.String |
toString()
Return body name in String. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Body(java.lang.String name) throws SpiceException
SpiceException
public Body(int code) throws SpiceErrorException
SpiceErrorException
public Body(Body b) throws SpiceException
SpiceException
Method Detail |
---|
public boolean equals(java.lang.Object obj)
The integer codes of the bodies are used for the comparison.
equals
in class java.lang.Object
public int hashCode()
Note that this method can't throw a SpiceException.
hashCode
in class java.lang.Object
public int getIDCode() throws IDCodeNotFoundException, SpiceException
IDCodeNotFoundException
SpiceException
public java.lang.String getName() throws SpiceException
SpiceException
public java.lang.String toString()
toString
in class java.lang.Object
public double[] getValues(java.lang.String item) throws SpiceException
BODY<ID code>_<item>for example
BODY599_RADII
The variable is specified by the "item" substring of the name. For example, for the radius variable above, the input string is
"RADII"
The item name is case-sensitive.
SpiceException
|
JNISpice version 2.0.0 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |