Class FeatureCalculatorSingleFromMulti<T extends FeatureInput>
Object
FeatureCalculatorSingleFromMulti<T>
- Type Parameters:
T
- feature input-type
- All Implemented Interfaces:
FeatureCalculatorSingle<T>
public class FeatureCalculatorSingleFromMulti<T extends FeatureInput>
extends Object
implements FeatureCalculatorSingle<T>
Exposes a
FeatureCalculatorMulti
as a FeatureCalculatorSingle
.- Author:
- Owen Feehan
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble
Calculate the results of the feature with a particular input.double
calculateSuppressErrors
(T input, ErrorReporter errorReporter) Calculates the result for aninput
recording the error to anErrorReporter
if anything goes wrong, but throwing no exception.
-
Constructor Details
-
FeatureCalculatorSingleFromMulti
Creates from aFeatureCalculatorMulti
.- Parameters:
multi
- the calculator to expose as aFeatureCalculatorSingle
.- Throws:
InitializeException
- ifmulti
has more than one feature.
-
-
Method Details
-
calculateSuppressErrors
Description copied from interface:FeatureCalculatorSingle
Calculates the result for aninput
recording the error to anErrorReporter
if anything goes wrong, but throwing no exception.- Specified by:
calculateSuppressErrors
in interfaceFeatureCalculatorSingle<T extends FeatureInput>
- Parameters:
input
- the input to calculate.errorReporter
- where errors are recorded.- Returns:
- the result of the calculation.
-
calculate
Description copied from interface:FeatureCalculatorSingle
Calculate the results of the feature with a particular input.- Specified by:
calculate
in interfaceFeatureCalculatorSingle<T extends FeatureInput>
- Parameters:
input
- the input to calculate.- Returns:
- the results of the calculation.
- Throws:
FeatureCalculationException
- if the feature cannot be successfully calculated.
-