public static class MroStereoPair.Builder
extends java.lang.Object
To use the builder, instantiate it with the MroObservation
s,
optionally set a label and/or comment, and invoke the build()
mthod. For example, to create a new MRO stereo pair from two observations of
a Target
called aramChaos, one on orbit 13071 and the other
on orbit 13137, use the following code:
MroObservation obs1 = new MroObservation.Builder ( MroObservation.OrbitalData.findData (aramChaos, 13071) ).label ("ESP_013071_1825").comment ("Stereo-1 of Aram Chaos").build (); MroObservation obs2 = new MroObservation.Builder ( MroObservation.OrbitalData.findData (aramChaos, 13137) ).label ("ESP_013137_1825").comment ("Stereo-2 of Aram Chaos").build (); MroStereoPair pair = new MroStereoPair.Builder ( obs1, obs2 ).label ("Aram Chaos Pair").comment ("Candidate").build ();
The two observations must be of the same target site or an IllegalArgumentException
is thrown at construction.
Note that the builder is instantiated with MroObservation
s, so the
resulting stereo pair's stereo-1 and stereo-2 will be MRO observations
specifically.
Constructor and Description |
---|
Builder(MroObservation stereo1,
MroObservation stereo2)
Creates a new MRO stereo pair builder with the indicated MRO observations.
|
Modifier and Type | Method and Description |
---|---|
MroStereoPair |
build()
Instantiates a new, immutable MRO stereo pair from this builder.
|
MroStereoPair.Builder |
comment(java.lang.String comment)
Sets the optional comment for this builder.
|
MroStereoPair.Builder |
label(java.lang.String label)
Sets the optional label for this builder.
|
public Builder(MroObservation stereo1, MroObservation stereo2)
Note that the builder is instantiated with MroObservation
s, so the
stereo-1 and stereo-2 observations of the pair to be built will be MRO
observations specifically.
stereo1
- the stereo-1 MRO observation.stereo2
- the stereo-2 MRO observation.java.lang.NullPointerException
- if either of the observations is
null.java.lang.IllegalArgumentException
- if the two observations are not of the
same target site.public MroStereoPair.Builder label(java.lang.String label)
build()
method is invoked.label
- the stereo pair's optional label.public MroStereoPair.Builder comment(java.lang.String comment)
build()
method is invoked.comment
- the stereo pair's optional comment.public MroStereoPair build()
Note that the builder is instantiated with MroObservation
s, so the
resulting stereo pair's stereo-1 and stereo-2 will be MRO observations
specifically.
Copyright \ (C) Arizona Board of Regents on behalf of the \ Planetary Image Research Laboratory, Lunar and \ Planetary Laboratory at the University of Arizona