Class CalculateInputFromDelegate<S,T extends org.anchoranalysis.feature.input.FeatureInput,U>
Object
org.anchoranalysis.feature.calculate.part.CalculationPart<S,T>
org.anchoranalysis.plugin.image.feature.object.calculation.delegate.CalculateInputFromDelegate<S,T,U>
- Type Parameters:
S- final-type ofCalculationPart.T- feature input-type as input to cached-calculations.U- delegate-type ofCalculationPart.
- All Implemented Interfaces:
org.anchoranalysis.feature.calculate.cache.ResettableCalculation
- Direct Known Subclasses:
CalculateInputFromDelegateOption,CalculateIntersecting
public abstract class CalculateInputFromDelegate<S,T extends org.anchoranalysis.feature.input.FeatureInput,U>
extends org.anchoranalysis.feature.calculate.part.CalculationPart<S,T>
A base class for
CalculationParts that derive from an existing "delegate" calculation.
These types of calculations involve two steps:
- Calculating from an existing
CalculationPart. - Applying a transform to generate parameters.
- Author:
- Owen Feehan
-
Constructor Summary
Constructors Modifier Constructor Description protectedCalculateInputFromDelegate(org.anchoranalysis.feature.calculate.cache.part.ResolvedPart<U,T> delegate)protectedCalculateInputFromDelegate(org.anchoranalysis.feature.calculate.part.CalculationPart<U,T> delegate, org.anchoranalysis.feature.calculate.part.CalculationPartResolver<T> cache)Creates a newCalculateInputFromDelegate. -
Method Summary
Modifier and Type Method Description protected booleancanEqual(Object other)protected abstract SderiveFromDelegate(T input, U delegate)Derives the result from the delegate calculation.booleanequals(Object o)Sexecute(T input)protected org.anchoranalysis.feature.calculate.cache.part.ResolvedPart<U,T>getDelegate()Gets the delegateResolvedPart.inthashCode()
-
Constructor Details
-
CalculateInputFromDelegate
protected CalculateInputFromDelegate(org.anchoranalysis.feature.calculate.part.CalculationPart<U,T> delegate, org.anchoranalysis.feature.calculate.part.CalculationPartResolver<T> cache)Creates a newCalculateInputFromDelegate.- Parameters:
delegate- the delegateCalculationPartcache- theCalculationPartResolverto use for caching
-
CalculateInputFromDelegate
-
-
Method Details
-
execute
-
deriveFromDelegate
Derives the result from the delegate calculation.- Parameters:
input- the input for the calculationdelegate- the result of the delegate calculation- Returns:
- the derived result
-
getDelegate
Gets the delegateResolvedPart.- Returns:
- the delegate
ResolvedPart
-
equals
-
canEqual
-
hashCode
public int hashCode()
-