Class FromDictionary<T extends FeatureInputDictionary>
Object
AnchorBean<Feature<T>>
- Type Parameters:
T
- feature-input type
Extracts a key-value from a
Dictionary
as a double.
Note the key has an optional prefix and suffix, so that the actual key used is
${keyPrefix}${key}${keySuffix}
- Author:
- Owen Feehan
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
beforeCalc
(FeatureInitialization initialization) Dummy method, that children can optionally override.double
calculate
(FeatureCalculationInput<T> input) Calculates a value for some input.void
checkMisconfigured
(BeanInstanceMap defaultInstances) Checks that a bean's properties conform to expectations.getKey()
Prefix prepended to keyvoid
void
setKeyPrefix
(String keyPrefix) Prefix prepended to keyvoid
setKeySuffix
(String keySuffix) Methods inherited from class org.anchoranalysis.feature.bean.operator.FeatureGeneric
inputType
Methods inherited from class org.anchoranalysis.feature.bean.Feature
assignTo, calculateCheckInitialized, castAs, createListChildFeatures, describeBean, describeParameters, descriptionLong, duplicateChangeName, getCustomName, getFriendlyName, onInitialization, setCustomName, toString
Methods inherited from class org.anchoranalysis.bean.initializable.InitializableBean
getInitialization, getLogger, getPropertyInitializer, initialize, initializeRecursive, initRecursiveWithInitializer, isInitialized
Methods inherited from class org.anchoranalysis.bean.AnchorBean
describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise
-
Constructor Details
-
FromDictionary
public FromDictionary()
-
-
Method Details
-
checkMisconfigured
Description copied from class:AnchorBean
Checks that a bean's properties conform to expectations.- Overrides:
checkMisconfigured
in classAnchorBean<Feature<T extends FeatureInputDictionary>>
- Parameters:
defaultInstances
- all available default instances if theDefaultInstance
annotation is used- Throws:
BeanMisconfiguredException
- if the bean has not been configured properly as XML
-
calculate
Description copied from class:Feature
Calculates a value for some input.- Specified by:
calculate
in classFeature<T extends FeatureInputDictionary>
- Parameters:
input
- the input to the calculation.- Returns:
- the result of the calculation.
- Throws:
FeatureCalculationException
- if the calculation cannot successfully complete.
-
beforeCalc
Description copied from class:Feature
Dummy method, that children can optionally override.- Overrides:
beforeCalc
in classFeature<T extends FeatureInputDictionary>
- Parameters:
initialization
- initialization parameters.- Throws:
InitializeException
- if initialization cannot complete successfully.
-
getKeyPrefix
Prefix prepended to key -
setKeyPrefix
Prefix prepended to key -
getKey
-
setKey
-
getKeySuffix
-
setKeySuffix
-