Class RuggedBuilder


  • public class RuggedBuilder
    extends Object
    Builder for Rugged instances.

    This class implements the builder pattern to create Rugged instances. It does so by using a fluent API in order to clarify reading and allow later extensions with new configuration parameters.

    A typical use would be:

       Rugged rugged = new RuggedBuilder().
                       setEllipsoid(EllipsoidId.WGS84, BodyRotatingFrameId.ITRF).
                       setAlgorithmID(AlgorithmId.Duvenhage).
                       setDigitalElevationModel(tileUpdater, maxCachedTiles).
                       setTimeSpan(minDate, maxDate, tStep, overshootTolerance).
                       setTrajectory(positionsVelocities, pvInterpolationNumber, pvFilter,
                                     quaternions, aInterpolationNumber, aFilter).
                       addLineSensor(sensor1).
                       addLineSensor(sensor2).
                       addLineSensor(sensor3).
                       build();
     

    If a configuration parameter has not been set prior to the call to {]link #build()}, then an exception will be triggered with an explicit error message.

    Author:
    Luc Maisonobe, Guylaine Prat
    See Also:
    Builder pattern (wikipedia), Fluent interface (wikipedia)