|
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.Surface
public class Surface
Class Surface is used to represent identities of surfaces associated with ephemeris objects.
This class takes the place of integer ID codes and surface names used by subroutine interfaces in SPICELIB and CSPICE. However, Surface names and codes are still used to construct Surface objects: either a name or NAIF integer code must be supplied in order to construct a Surface.
Each Surface is associated with a Body. Surface ID-name mappings associated with a given Body are distinct from those associated with another Body: Bodies can be thought of as identifying name spaces for Surface ID codes and names. A set consisting of a Surface ID code and a Body can be mapped to a Surface name, and a set consisting of a Surface name and a Body can be mapped to a Surface ID code.
Constructor Summary | |
---|---|
Surface()
No-arguments constructor. |
|
Surface(int code,
Body body)
Construct a Surface from an integer code and an associated Body. |
|
Surface(java.lang.String name,
Body body)
Construct a Surface from a surface name and an associated Body. |
|
Surface(Surface s)
Construct a Surface from another Surface. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
Test two Surfaces for equality. |
Body |
getBody()
Return the body associated with this surface. |
int |
getIDCode()
Return NAIF ID code associated with a Surface. |
java.lang.String |
getName()
Return name associated with a Surface. |
int |
hashCode()
Return a hash code for this Surface. |
java.lang.String |
toString()
Return surface name in String. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Surface()
public Surface(java.lang.String name, Body body) throws SpiceException
SpiceException
public Surface(int code, Body body) throws SpiceException
SpiceException
public Surface(Surface s) throws SpiceException
SpiceException
Method Detail |
---|
public int getIDCode() throws IDCodeNotFoundException, SpiceException
IDCodeNotFoundException
SpiceException
public java.lang.String getName() throws SpiceException
SpiceException
public Body getBody() throws SpiceException
SpiceException
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object obj)
The integer codes of the surfaces and associated bodies are used for the comparison.
equals
in class java.lang.Object
public int hashCode()
Hash codes are not necessarily distinct for distinct surfaces.
Note that this method can't throw a SpiceException.
hashCode
in class java.lang.Object
|
JNISpice version 2.0.0 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |