Class CalculateInputFromPair
- All Implemented Interfaces:
ResettableCalculation
public class CalculateInputFromPair
extends CalculationPart<FeatureInputSingleObject,FeatureInputPairObjects>
Calculates a single-input from a pair of objects.
Three extraction modes are possible:
- First object
- Second object
- Merged objects
- Author:
- Owen Feehan
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Defines the extraction mode for the calculation. -
Constructor Summary
ConstructorsConstructorDescriptionCreates a newCalculateInputFromPair
instance. -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
protected FeatureInputSingleObject
execute
(FeatureInputPairObjects input) Executes the calculation to extract a single object from the pair.int
hashCode()
Methods inherited from class org.anchoranalysis.feature.calculate.part.CalculationPart
getOrCalculate, hasCachedResult, invalidate
-
Constructor Details
-
CalculateInputFromPair
Creates a newCalculateInputFromPair
instance.- Parameters:
extract
- The extraction mode to use.
-
-
Method Details
-
execute
Executes the calculation to extract a single object from the pair.- Specified by:
execute
in classCalculationPart<FeatureInputSingleObject,
FeatureInputPairObjects> - Parameters:
input
- The input pair of objects.- Returns:
- A new FeatureInputSingleObject containing the extracted object and energy stack.
-
equals
- Specified by:
equals
in classCalculationPart<FeatureInputSingleObject,
FeatureInputPairObjects>
-
canEqual
-
hashCode
public int hashCode()- Specified by:
hashCode
in classCalculationPart<FeatureInputSingleObject,
FeatureInputPairObjects>
-