public static class SimpleObservation.Builder
extends java.lang.Object
To use the builder, instantiate it with the observer, target, and ephemeris
time, optionally set a label and/or comment, and invoke the build()
method. For example, to create a new observation with an Observer
called mro of a Target
called aramChaos, use the
following code:
SimpleObservation observation = new SimpleObservation.Builder ( mro, aramChaos, 295272514.521 ).label ("ESP_013158_1830").comment ("Stereo-1 of Aram Chaos").build ();
If the builder's optional label (or comment) is null, the simple observation's label (or comment) will be set to the empty string ("") at construction; neither will be null.
It is assumed that all necessary SPICE kernels are loaded into the SPICE
kernel pool when the observation is constructed; if not, a SpiceException
will be thrown.
Constructor and Description |
---|
Builder(Observer observer,
Target target,
double et)
Creates a new simple observation builder with the indicated observer, target,
and ephemeris time.
|
Modifier and Type | Method and Description |
---|---|
SimpleObservation |
build()
Instantiates a new, immutable simple observation from this builder.
|
SimpleObservation.Builder |
comment(java.lang.String comment)
Sets the optional comment for this builder.
|
SimpleObservation.Builder |
label(java.lang.String label)
Sets the optional label for this builder.
|
public Builder(Observer observer, Target target, double et)
observer
- the observation's observer.target
- the observation's target.et
- the observation's ephemeris time.java.lang.NullPointerException
- if the observer or the target is
null.edu.asu.jmars.layer.obs.mro.SpiceException
- if the SPICE kernel pool lacks the necessary kernels
for calculating the observation data.public SimpleObservation.Builder label(java.lang.String label)
build()
method is invoked.label
- the observation's optional label.public SimpleObservation.Builder comment(java.lang.String comment)
build()
method is invoked.comment
- the observation's optional comment.public SimpleObservation build()
Copyright \ (C) Arizona Board of Regents on behalf of the \ Planetary Image Research Laboratory, Lunar and \ Planetary Laboratory at the University of Arizona