Class IfCondition<T extends FeatureInput>
Object
AnchorBean<Feature<T>>
InitializableBean<Feature<T>,FeatureInitialization>
Feature<T>
FeatureUnary<T,T>
FeatureUnaryGeneric<T>
IfCondition<T>
- Type Parameters:
T
- feature input-type
The result of featureCondition is compared to a threshold, and then either the underlying feature
is calculated (positive case), or featureElse is (negative case)
The positive case is when relation(featureCondition,value) is true..
- Author:
- Owen Feehan
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble
calculate
(FeatureCalculationInput<T> input) Calculates a value for some input.void
setFeatureCondition
(Feature<T> featureCondition) void
setFeatureElse
(Feature<T> featureElse) void
setThreshold
(RelationToThreshold threshold) Methods inherited from class org.anchoranalysis.feature.bean.operator.FeatureUnary
getItem, inputType, setItem
Methods inherited from class org.anchoranalysis.feature.bean.Feature
assignTo, beforeCalc, 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
-
IfCondition
public IfCondition()
-
-
Method Details
-
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.
-
getFeatureCondition
-
setFeatureCondition
-
getFeatureElse
-
setFeatureElse
-
getThreshold
-