Class CalculateInputFromDelegateOption<S extends org.anchoranalysis.feature.input.FeatureInput,​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<Optional<S>,​T,​U>
org.anchoranalysis.plugin.image.feature.object.calculation.delegate.CalculateInputFromDelegateOption<S,​T,​U>
Type Parameters:
S - optional final-type of CalculationPart.
T - feature input-type as input to cached-calculations.
U - delegate-type of CalculationPart.
All Implemented Interfaces:
org.anchoranalysis.feature.calculate.cache.ResettableCalculation

public abstract class CalculateInputFromDelegateOption<S extends org.anchoranalysis.feature.input.FeatureInput,​T extends org.anchoranalysis.feature.input.FeatureInput,​U>
extends CalculateInputFromDelegate<Optional<S>,​T,​U>
Like CalculateInputFromDelegate except assumes optional return value and no parameters.
Author:
Owen Feehan
  • Constructor Summary

    Constructors 
    Modifier Constructor Description
    protected CalculateInputFromDelegateOption​(org.anchoranalysis.feature.calculate.cache.part.ResolvedPart<U,​T> delegate)
    Creates with a delegate.
  • Method Summary

    Modifier and Type Method Description
    static <S extends org.anchoranalysis.feature.input.FeatureInput,​ T extends org.anchoranalysis.feature.input.FeatureInput,​ U>
    double
    calc​(org.anchoranalysis.feature.calculate.FeatureCalculationInput<T> input, org.anchoranalysis.feature.calculate.part.CalculationPart<U,​T> delegate, Function<org.anchoranalysis.feature.calculate.cache.part.ResolvedPart<U,​T>,​CalculateInputFromDelegateOption<S,​T,​U>> createFromDelegate, org.anchoranalysis.feature.bean.Feature<S> feature, org.anchoranalysis.feature.calculate.cache.ChildCacheName cacheName, double emptyValue)
    Calculates a feature using a cached-calculation as delegate.
    protected boolean canEqual​(Object other)  
    boolean equals​(Object o)  
    int hashCode()  

    Methods inherited from class org.anchoranalysis.plugin.image.feature.object.calculation.delegate.CalculateInputFromDelegate

    deriveFromDelegate, execute, getDelegate

    Methods inherited from class org.anchoranalysis.feature.calculate.part.CalculationPart

    getOrCalculate, hasCachedResult, invalidate

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • CalculateInputFromDelegateOption

      protected CalculateInputFromDelegateOption​(org.anchoranalysis.feature.calculate.cache.part.ResolvedPart<U,​T> delegate)
      Creates with a delegate.
      Parameters:
      delegate - the resolved-calculation for the delegate.
  • Method Details

    • calc

      public static <S extends org.anchoranalysis.feature.input.FeatureInput,​ T extends org.anchoranalysis.feature.input.FeatureInput,​ U> double calc​(org.anchoranalysis.feature.calculate.FeatureCalculationInput<T> input, org.anchoranalysis.feature.calculate.part.CalculationPart<U,​T> delegate, Function<org.anchoranalysis.feature.calculate.cache.part.ResolvedPart<U,​T>,​CalculateInputFromDelegateOption<S,​T,​U>> createFromDelegate, org.anchoranalysis.feature.bean.Feature<S> feature, org.anchoranalysis.feature.calculate.cache.ChildCacheName cacheName, double emptyValue) throws org.anchoranalysis.feature.calculate.FeatureCalculationException
      Calculates a feature using a cached-calculation as delegate.
      Type Parameters:
      S - optional final input-type for calculation
      T - input-type for calculation
      U - 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:
      org.anchoranalysis.feature.calculate.FeatureCalculationException - if the calculation does not succeed successfully.
    • equals

      public boolean equals​(Object o)
      Overrides:
      equals in class CalculateInputFromDelegate<Optional<S extends org.anchoranalysis.feature.input.FeatureInput>,​T extends org.anchoranalysis.feature.input.FeatureInput,​U>
    • canEqual

      protected boolean canEqual​(Object other)
      Overrides:
      canEqual in class CalculateInputFromDelegate<Optional<S extends org.anchoranalysis.feature.input.FeatureInput>,​T extends org.anchoranalysis.feature.input.FeatureInput,​U>
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class CalculateInputFromDelegate<Optional<S extends org.anchoranalysis.feature.input.FeatureInput>,​T extends org.anchoranalysis.feature.input.FeatureInput,​U>