Class Constant<T extends FeatureInput>
Object
org.anchoranalysis.bean.AnchorBean<B>
org.anchoranalysis.bean.initializable.InitializableBean<Feature<T>,FeatureInitialization>
org.anchoranalysis.feature.bean.Feature<T>
org.anchoranalysis.feature.bean.operator.FeatureGeneric<T>
org.anchoranalysis.feature.bean.operator.Constant<T>
- Type Parameters:
T- the input-type (even though it is irrelevant and ignored, but it keeps the class hierarchy consistent).
public class Constant<T extends FeatureInput> extends FeatureGeneric<T>
A constant value that is entirely invariant to the feature-input.
- Author:
- Owen Feehan
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description doublecalculate(FeatureCalculationInput<T> input)Calculates a value for some input.StringdescribeParameters()A human-readable description of the parameterization of the bean.StringdescriptionLong()A long human-readable description of the feature and some or all of its parameterization.doublegetValue()The constant value.voidsetValue(double value)The constant value.Methods inherited from class org.anchoranalysis.feature.bean.Feature
assignTo, beforeCalc, calculateCheckInitialized, castAs, createListChildFeatures, describeBean, duplicateChangeName, getCustomName, getFriendlyName, onInitialization, setCustomName, toStringMethods inherited from class org.anchoranalysis.bean.initializable.InitializableBean
getInitialization, getLogger, getPropertyInitializer, initialize, initializeRecursive, initRecursiveWithInitializer, isInitializedMethods inherited from class org.anchoranalysis.bean.AnchorBean
checkMisconfigured, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise
-
Constructor Details
-
Method Details
-
calculate
Description copied from class:FeatureCalculates a value for some input.- Specified by:
calculatein classFeature<T extends FeatureInput>- Parameters:
input- the input to the calculation.- Returns:
- the result of the calculation.
-
describeParameters
Description copied from class:FeatureA human-readable description of the parameterization of the bean.- Overrides:
describeParametersin classFeature<T extends FeatureInput>- Returns:
- the description.
-
descriptionLong
Description copied from class:FeatureA long human-readable description of the feature and some or all of its parameterization.This can be overwritten to create an alternative description for features. By default string returned by
Feature.describeBean()is used.- Overrides:
descriptionLongin classFeature<T extends FeatureInput>- Returns:
- the description.
-
getValue
public double getValue()The constant value. -
setValue
public void setValue(double value)The constant value.
-