public class Observer
extends java.lang.Object
To instantiate a new observer, use the Observer.Builder
. Instantiate a new
builder with the observer's NAIF ID and reference frame, optionally set a
label and/or comment, and invoke the Observer.Builder.build()
method. For
example, to create a new MRO observer in the IAU-defined body-fixed Mars
reference frame, use the following code:
Observer mro = new Observer.Builder ( -74, "IAU_MARS" ).label ("MRO").comment ("MRO in the IAU body-fixed Mars frame.").build ();
-74 is the NAIF ID code for MRO.
If the builder's label was not set, or if it is set to null, the observer's label will be set at construction to the observer's name, which is derived from its NAIF ID.
Modifier and Type | Class and Description |
---|---|
static class |
Observer.Builder
A builder for an immutable observer object.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ID
Class identification name with source code version and date.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o)
Indicates whether some other object is "equal to" this one.
|
java.lang.String |
getComment()
Gets an optional comment describing this observer.
|
int |
getHighPrecisionNaifID()
Gets this observer's high-precision NAIF ID.
|
java.lang.String |
getLabel()
Gets the label describing this observer.
|
int |
getNaifID()
Gets this observer's NAIF ID.
|
java.lang.String |
getName()
Gets this observer's name as determined by its NAIF ID.
|
java.lang.String |
getReferenceFrame()
Gets this observer's reference frame name.
|
int |
hashCode()
Returns a hash code value for this stereo target.
|
java.lang.String |
toString()
Gets a string representation of this stereo target.
|
public static final java.lang.String ID
public int getNaifID()
public int getHighPrecisionNaifID()
The high-precision ID is naifID * 1000 - 999. For MRO, for example, which has -74, the high-precision ID is -74999.
public java.lang.String getName()
public java.lang.String getReferenceFrame()
public java.lang.String getLabel()
Observer.Builder
), it will be the same as this
observer's name
.public java.lang.String getComment()
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
Two observers are equal if and only if they have the same NAIF ID, the same reference frame, the same label, and the same comment.
equals
in class java.lang.Object
o
- the object to which this object is compared.Copyright \ (C) Arizona Board of Regents on behalf of the \ Planetary Image Research Laboratory, Lunar and \ Planetary Laboratory at the University of Arizona