Class ResolvedPartMap<S,T extends FeatureInput,U>

Object
ResolvedPartMap<S,T,U>
Type Parameters:
S - result-type
T - feature input-type
U - key-type

public class ResolvedPartMap<S,T extends FeatureInput,U> extends Object
A CalculationPartMap that has been resolved against a cache.
Author:
Owen Feehan
  • Constructor Details

  • Method Details

    • getOrCalculate

      public S getOrCalculate(T input, U key) throws FeatureCalculationException
      Executes the operation and returns a result, either by doing the calculation, or retrieving a cached-result from a previous execution.
      Parameters:
      input - used to calculate a result, if there is no value already cached. Ignored if a result already exists.
      key - the key, which determines if a result already exists or not.
      Returns:
      the result of the calculation.
      Throws:
      FeatureCalculationException - if the calculation cannot successfully complete.
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object