Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
Rugged-MOD
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
youngcle
Rugged-MOD
Commits
f25f2557
Commit
f25f2557
authored
10 years ago
by
Luc Maisonobe
Browse files
Options
Downloads
Patches
Plain Diff
Added fluent API.
parent
dcefc066
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/org/orekit/rugged/los/LOSBuilder.java
+14
-2
14 additions, 2 deletions
src/main/java/org/orekit/rugged/los/LOSBuilder.java
with
14 additions
and
2 deletions
src/main/java/org/orekit/rugged/los/LOSBuilder.java
+
14
−
2
View file @
f25f2557
...
...
@@ -22,9 +22,15 @@ import java.util.List;
import
org.apache.commons.math3.analysis.differentiation.DerivativeStructure
;
import
org.apache.commons.math3.geometry.euclidean.threed.FieldVector3D
;
import
org.apache.commons.math3.geometry.euclidean.threed.Vector3D
;
import
org.orekit.rugged.api.Rugged
;
import
org.orekit.time.AbsoluteDate
;
/** Builder for lines-of-sight list.
* <p>
* This class implements the <em>builder pattern</em> to create {@link TimeDependentLOS} instances.
* It does so by using a <em>fluent API</em> in order to clarify reading and allow
* later extensions with new configuration parameters.
* </p>
* <p>
* This builder aims at creating lines-of-sight directions which are
* the result of several transforms applied to an initial list of raw
...
...
@@ -33,6 +39,8 @@ import org.orekit.time.AbsoluteDate;
* to a spacecraft.
* </p>
* @see TimeDependentLOS
* @see <a href="https://en.wikipedia.org/wiki/Builder_pattern">Builder pattern (wikipedia)</a>
* @see <a href="https://en.wikipedia.org/wiki/Fluent_interface">Fluent interface (wikipedia)</a>
* @author Luc Maisonobe
*/
public
class
LOSBuilder
{
...
...
@@ -57,17 +65,21 @@ public class LOSBuilder {
/** Add a transform to be applied after the already registered transforms.
* @param transform transform to be applied to the lines-of-sight
* @return the builder instance
*/
public
void
addTransform
(
final
TimeIndependentLOSTransform
transform
)
{
public
LOSBuilder
addTransform
(
final
TimeIndependentLOSTransform
transform
)
{
transforms
.
add
(
new
TransformAdapter
(
transform
));
return
this
;
}
/** Add a transform to be applied after the already registered transforms.
* @param transform transform to be applied to the lines-of-sight
* @return the builder instance
*/
public
void
addTransform
(
final
LOSTransform
transform
)
{
public
LOSBuilder
addTransform
(
final
LOSTransform
transform
)
{
transforms
.
add
(
transform
);
timeIndependent
=
false
;
return
this
;
}
/** Build a lines-of-sight provider.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment