Class IfConditionWithinRange<T extends FeatureInput>
Object
AnchorBean<Feature<T>>
InitializableBean<Feature<T>,FeatureInitialization>
Feature<T>
FeatureUnary<T,T>
FeatureUnaryGeneric<T>
RangeCompareBase<T>
RangeCompareFromScalars<T>
IfConditionWithinRange<T>
- Type Parameters:
T
- feature input type
Calculates a value if a condition lies within a certain range, otherwise returns constants
- Author:
- Owen Feehan
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSpecifies which feature to calculate the input value.Calculates value for the condition - which is checked if it lies within a certain rangevoid
setFeatureCondition
(Feature<T> featureCondition) Calculates value for the condition - which is checked if it lies within a certain rangeprotected double
withinRangeValue
(double valWithinRange, FeatureCalculationInput<T> input) Calculates the value to return if the input is within the range.Methods inherited from class org.anchoranalysis.plugin.operator.feature.bean.range.RangeCompareFromScalars
boundaryMax, boundaryMin, describeParameters, getMax, getMin, setMax, setMin
Methods inherited from class org.anchoranalysis.plugin.operator.feature.bean.range.RangeCompareBase
calculate, getAboveMaxValue, getBelowMinValue, setAboveMaxValue, setBelowMinValue
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, 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
-
IfConditionWithinRange
public IfConditionWithinRange()
-
-
Method Details
-
featureToCalcInputValue
Description copied from class:RangeCompareBase
Specifies which feature to calculate the input value.- Specified by:
featureToCalcInputValue
in classRangeCompareBase<T extends FeatureInput>
- Returns:
- the
Feature
used to calculate the input value
-
withinRangeValue
protected double withinRangeValue(double valWithinRange, FeatureCalculationInput<T> input) throws FeatureCalculationException Description copied from class:RangeCompareBase
Calculates the value to return if the input is within the range.- Specified by:
withinRangeValue
in classRangeCompareBase<T extends FeatureInput>
- Parameters:
valWithinRange
- the input value that is within the rangeinput
- theFeatureCalculationInput
to use for calculation- Returns:
- the calculated value
- Throws:
FeatureCalculationException
- if the calculation fails
-
getFeatureCondition
Calculates value for the condition - which is checked if it lies within a certain range -
setFeatureCondition
Calculates value for the condition - which is checked if it lies within a certain range
-