Class CompareWithRange<T extends FeatureInput>
Object
AnchorBean<Feature<T>>
InitializableBean<Feature<T>,FeatureInitialization>
Feature<T>
FeatureUnary<T,T>
FeatureUnaryGeneric<T>
RangeCompareBase<T>
RangeCompareFromScalars<T>
CompareWithRange<T>
- Type Parameters:
T
- feature-input-type
Compares a value with a range, returning specified constants if its inside the range, below it or
above it
- Author:
- Owen Feehan
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionA human-readable description of the parameterization of the bean.Specifies which feature to calculate the input value.double
Constant to return if value lies within the rangevoid
setWithinValue
(double withinValue) Constant to return if value lies within the 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, 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
-
CompareWithRange
public CompareWithRange()
-
-
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
-
describeParameters
Description copied from class:Feature
A human-readable description of the parameterization of the bean.- Overrides:
describeParameters
in classRangeCompareFromScalars<T extends FeatureInput>
- Returns:
- the description.
-
getWithinValue
public double getWithinValue()Constant to return if value lies within the range -
setWithinValue
public void setWithinValue(double withinValue) Constant to return if value lies within the range
-