T
- feature-input typepublic class FromDictionary<T extends FeatureInputDictionary> extends FeatureGeneric<T>
Dictionary
as a double.
Note the key has an optional prefix and suffix, so that the actual key used is
${keyPrefix}${key}${keySuffix}
Constructor and Description |
---|
FromDictionary() |
Modifier and Type | Method and Description |
---|---|
protected 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.
|
String |
getKey() |
String |
getKeyPrefix()
Prefix prepended to key
|
String |
getKeySuffix() |
void |
setKey(String key) |
void |
setKeyPrefix(String keyPrefix)
Prefix prepended to key
|
void |
setKeySuffix(String keySuffix) |
inputType
assignTo, calculateCheckInitialized, castAs, createListChildFeatures, describeBean, describeParameters, descriptionLong, duplicateChangeName, getCustomName, getFriendlyName, onInitialization, setCustomName, toString
getInitialization, getLogger, getPropertyInitializer, initialize, initializeRecursive, initRecursiveWithInitializer, isInitialized
describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise
public void checkMisconfigured(BeanInstanceMap defaultInstances) throws BeanMisconfiguredException
AnchorBean
checkMisconfigured
in class AnchorBean<Feature<T extends FeatureInputDictionary>>
defaultInstances
- all available default instances if the DefaultInstance
annotation is usedBeanMisconfiguredException
- if the bean has not been configured properly as XMLpublic double calculate(FeatureCalculationInput<T> input) throws FeatureCalculationException
Feature
calculate
in class Feature<T extends FeatureInputDictionary>
input
- the input to the calculation.FeatureCalculationException
- if the calculation cannot successfully complete.protected void beforeCalc(FeatureInitialization initialization) throws InitializeException
Feature
beforeCalc
in class Feature<T extends FeatureInputDictionary>
initialization
- initialization parameters.InitializeException
- if initialization cannot complete successfully.public String getKeyPrefix()
public void setKeyPrefix(String keyPrefix)
public String getKey()
public void setKey(String key)
public String getKeySuffix()
public void setKeySuffix(String keySuffix)
Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.