Class BaseParameterDriversSequenceBuilder<T,P extends BaseParameterDriver<P,O>,O extends BaseParameterObserver<P,O>,S extends BaseParameterDriversSequence<P,O>,B extends BaseParameterDriversSequenceBuilder<T,P,O,S,B>>
- Type Parameters:
T- type of the elementsP- type of the parameter driverO- type of the parameter observerS- type of the parameters drivers sequenceB- type of the parameters drivers sequence builder
- Direct Known Subclasses:
FieldParameterDriversSequenceBuilder,ParameterDriversSequenceBuilder
ParameterDriversSequence.- Since:
- 14.0
- Author:
- Luc Maisonobe
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringPrefix for drivers limited to one time span. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBaseParameterDriversSequenceBuilder(String baseName, double scale, double minValue, double maxValue, T defaultValue) Constructor for an initially empty builder. -
Method Summary
Modifier and TypeMethodDescriptionaddReferenceValue(T referenceValue) Add a reference value throughout timeline.addReferenceValue(T referenceValue, AbsoluteDate earliestValidityDate, AbsoluteDate latestValidityDate) Add a reference value valid for a time span.build()Build aBaseParameterDriversSequence.protected abstract PbuildDriver(String name, T referenceValue, double scaleFactor, double min, double max, TimeInterval validity) Build a parameter driver.protected abstract SbuildSequence(TimeSpanMap<P> drivers) Build a sequence.
-
Field Details
-
SPAN_PREFIX
Prefix for drivers limited to one time span.- See Also:
-
-
Constructor Details
-
BaseParameterDriversSequenceBuilder
protected BaseParameterDriversSequenceBuilder(String baseName, double scale, double minValue, double maxValue, T defaultValue) Constructor for an initially empty builder.The builder
build()method cannot be called right after construction. Some reference values must be set before, either by calling theaddReferenceValue(referenceValue)method once, or by calling theaddReferenceValue(referenceValue, earliestValidityDate, latestValidityDate)method as many times as needed to cover the usage range before thebuild()method can be called.- Parameters:
baseName- base name of the parametersscale- scaling factor to convert the parameters value to non-dimensional (typically set to the expected standard deviation of the parameter), it must be non-zerominValue- minimum value allowedmaxValue- maximum value alloweddefaultValue- default value valid throughout timeline
-
-
Method Details
-
addReferenceValue
Add a reference value throughout timeline.Calling this method is equivalent to call
addReferenceValue(referenceValue, AbsoluteDate.PAST_INFINITY, AbsoluteDate.FUTURE_INFINITY).- Parameters:
referenceValue- reference value- Returns:
- the instance itself, allowing use of the fluent interface pattern
-
addReferenceValue
public B addReferenceValue(T referenceValue, AbsoluteDate earliestValidityDate, AbsoluteDate latestValidityDate) Add a reference value valid for a time span.- Parameters:
referenceValue- reference valueearliestValidityDate- date after which the coefficient is validlatestValidityDate- date before which the coefficient is valid- Returns:
- the instance itself, allowing use of the fluent interface pattern
-
build
Build aBaseParameterDriversSequence.If only one reference value has been set, its name will be the base name set at construction. If several reference values have been set, their names will be built by concatenating together
SPAN_PREFIX, followed by the base name set at construction, followed by a single "-", and finally appending the index of the parameter driver, counting from 0.- Returns:
- built sequence
-
buildDriver
protected abstract P buildDriver(String name, T referenceValue, double scaleFactor, double min, double max, TimeInterval validity) Build a parameter driver.- Parameters:
name- name of the parameterreferenceValue- reference value of the parameterscaleFactor- scaling factor to convert the parameters value to non-dimensional (typically set to the expected standard deviation of the parameter), it must be non-zeromin- minimum value allowedmax- maximum value allowedvalidity- validity interval- Returns:
- built parameter driver
-
buildSequence
Build a sequence.- Parameters:
drivers- drivers sequence- Returns:
- built sequence
-