Class ParamFromCollection<T extends FeatureInput>
Object
AnchorBean<Feature<T>>
InitializableBean<Feature<T>,FeatureInitialization>
Feature<T>
FeatureGeneric<T>
ParamFromCollection<T>
- Type Parameters:
T
- feature-input-type
Retrieves a parameter as stored in a
Dictionary
in SharedObjects
.
This differs from FromDictionary
which
reads the parameter from the energy-stack, whereas this from a specific parameters collection.
- 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.The name of theDictionary
that will be retrieved fromSharedObjects
.getKey()
The name of the key in the dictionary, whose corresponding value will be returned.void
setDictionary
(String dictionary) The name of theDictionary
that will be retrieved fromSharedObjects
.void
The name of the key in the dictionary, whose corresponding value will be returned.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
checkMisconfigured, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise
-
Constructor Details
-
ParamFromCollection
public ParamFromCollection()
-
-
Method Details
-
beforeCalc
Description copied from class:Feature
Dummy method, that children can optionally override.- Overrides:
beforeCalc
in classFeature<T extends FeatureInput>
- Parameters:
initialization
- initialization parameters.- Throws:
InitializeException
- if initialization cannot complete successfully.
-
calculate
Description copied from class:Feature
Calculates a value for some input.- Specified by:
calculate
in classFeature<T extends FeatureInput>
- Parameters:
input
- the input to the calculation.- Returns:
- the result of the calculation.
- Throws:
FeatureCalculationException
- if the calculation cannot successfully complete.
-
getDictionary
The name of theDictionary
that will be retrieved fromSharedObjects
. -
setDictionary
The name of theDictionary
that will be retrieved fromSharedObjects
. -
getKey
The name of the key in the dictionary, whose corresponding value will be returned. -
setKey
The name of the key in the dictionary, whose corresponding value will be returned.
-