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 TypeMethodDescriptiondoubleCalculate the results of the feature with a particular input.doublecalculateSuppressErrors(T input, ErrorReporter errorReporter) Calculates the result for aninputrecording the error to anErrorReporterif anything goes wrong, but throwing no exception.
-
Constructor Details
-
FeatureCalculatorSingleFromMulti
Creates from aFeatureCalculatorMulti.- Parameters:
multi- the calculator to expose as aFeatureCalculatorSingle.- Throws:
InitializeException- ifmultihas more than one feature.
-
-
Method Details
-
calculateSuppressErrors
Description copied from interface:FeatureCalculatorSingleCalculates the result for aninputrecording the error to anErrorReporterif anything goes wrong, but throwing no exception.- Specified by:
calculateSuppressErrorsin 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:FeatureCalculatorSingleCalculate the results of the feature with a particular input.- Specified by:
calculatein 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.
-