Interface FeatureSymbolCalculator<T extends FeatureInput>
- Type Parameters:
T
- feature-input type
- All Known Subinterfaces:
FeatureCalculator<T>
public interface FeatureSymbolCalculator<T extends FeatureInput>
Resolves and calculates a feature by a symbol.
A symbol is an ID/variable-name referring to another feature.
- Author:
- Owen Feehan
-
Method Summary
Modifier and TypeMethodDescriptiondouble
calculateFeatureByIdentifier
(String resolvedIdentifier, FeatureCalculationInput<T> input) Searches for a feature that matches a particular identifier.resolveFeatureIdentifier
(String identifier) Resolves an identifier to a unique-string, suitable forcalculateFeatureByIdentifier(String, FeatureCalculationInput)
.
-
Method Details
-
resolveFeatureIdentifier
Resolves an identifier to a unique-string, suitable forcalculateFeatureByIdentifier(String, FeatureCalculationInput)
.Due to scoping (different prefixes that can exist), an ID needs to be resolved to a unique-string before it can be passed to
calculateFeatureByIdentifier(String, FeatureCalculationInput)
.- Parameters:
identifier
- the identifier to resolve.- Returns:
- the resolved identifier.
-
calculateFeatureByIdentifier
double calculateFeatureByIdentifier(String resolvedIdentifier, FeatureCalculationInput<T> input) throws FeatureCalculationException Searches for a feature that matches a particular identifier.- Parameters:
resolvedIdentifier
- the identifier.input
- the feature-input to be calculated.- Returns:
- the result of the calculation.
- Throws:
FeatureCalculationException
- if the feature cannot be successfully calculated.
-