Class CalculateInputFromDelegateOption<S extends FeatureInput, T extends FeatureInput, U>
- Type Parameters:
S- optional final-type ofCalculationPart.T- feature input-type as input to cached-calculations.U- delegate-type ofCalculationPart.
- All Implemented Interfaces:
ResettableCalculation
public abstract class CalculateInputFromDelegateOption<S extends FeatureInput, T extends FeatureInput, U>
extends CalculateInputFromDelegate<Optional<S>, T, U>
Like
CalculateInputFromDelegate except assumes optional return value and no parameters.- Author:
- Owen Feehan
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCalculateInputFromDelegateOption(ResolvedPart<U, T> delegate) Creates with a delegate. -
Method Summary
Modifier and TypeMethodDescriptionstatic <S extends FeatureInput, T extends FeatureInput, U>
doublecalc(FeatureCalculationInput<T> input, CalculationPart<U, T> delegate, Function<ResolvedPart<U, T>, CalculateInputFromDelegateOption<S, T, U>> createFromDelegate, Feature<S> feature, ChildCacheName cacheName, double emptyValue) Calculates a feature using a cached-calculation as delegate.protected booleanbooleaninthashCode()Methods inherited from class org.anchoranalysis.plugin.image.feature.object.calculation.delegate.CalculateInputFromDelegate
deriveFromDelegate, execute, getDelegateMethods inherited from class org.anchoranalysis.feature.calculate.part.CalculationPart
getOrCalculate, hasCachedResult, invalidate
-
Constructor Details
-
CalculateInputFromDelegateOption
-
-
Method Details
-
calc
public static <S extends FeatureInput, T extends FeatureInput, U> double calc(FeatureCalculationInput<T> input, CalculationPart<U, T> delegate, Function<ResolvedPart<U, throws FeatureCalculationExceptionT>, CalculateInputFromDelegateOption<S, T, U>> createFromDelegate, Feature<S> feature, ChildCacheName cacheName, double emptyValue) Calculates a feature using a cached-calculation as delegate.- Type Parameters:
S- optional final input-type for calculationT- input-type for calculationU- delegate-type of CachedCalculation- Parameters:
input- feature-input.delegate- the Cached-Calculation delegate used.createFromDelegate- creates a calculation from the delegates.feature- feature to use to calculate the output result.cacheName- a sub-cache of the main cache to use for calculating the output feature.emptyValue- what to return if the parameters are empty.- Returns:
- the result of the feature calculation.
- Throws:
FeatureCalculationException- if the calculation does not succeed successfully.
-
equals
-
canEqual
-
hashCode
-