Class AsSingle
Extracts one of the memos from the pair, and processes as a
FeatureSingleMemo
- Author:
- Owen Feehan
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble
Calculates a value for some input.A human-readable description of the parameterization of the bean.Class
<? extends FeatureInput> The class corresponding to feature input-type.boolean
isFirst()
Iff true, first object is used, otherwise the secondvoid
setFirst
(boolean first) Iff true, first object is used, otherwise the secondMethods inherited from class org.anchoranalysis.feature.bean.operator.FeatureUnary
getItem, setItem
Methods inherited from class org.anchoranalysis.feature.bean.Feature
assignTo, beforeCalc, calculateCheckInitialized, castAs, createListChildFeatures, describeBean, 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
-
AsSingle
public AsSingle()
-
-
Method Details
-
calculate
public double calculate(FeatureCalculationInput<FeatureInputPairMemo> input) throws FeatureCalculationException Description copied from class:Feature
Calculates a value for some input.- Specified by:
calculate
in classFeature<FeatureInputPairMemo>
- Parameters:
input
- the input to the calculation.- Returns:
- the result of the calculation.
- Throws:
FeatureCalculationException
- if the calculation cannot successfully complete.
-
inputType
Description copied from class:Feature
The class corresponding to feature input-type.i.e. corresponding to the
T
template parameter.- Overrides:
inputType
in classFeatureUnary<FeatureInputPairMemo,
FeatureInputSingleMemo> - Returns:
- the class.
-
describeParameters
Description copied from class:Feature
A human-readable description of the parameterization of the bean.- Overrides:
describeParameters
in classFeature<FeatureInputPairMemo>
- Returns:
- the description.
-
isFirst
public boolean isFirst()Iff true, first object is used, otherwise the second -
setFirst
public void setFirst(boolean first) Iff true, first object is used, otherwise the second
-