Package net.sourceforge.pmd.lang.metrics
Interface MetricMemoizer<N extends Node>
-
- Type Parameters:
N- Type of node on which the memoized metric can be computed
- All Known Implementing Classes:
BasicMetricMemoizer,DummyMetricMemoizer
public interface MetricMemoizer<N extends Node>Objects capable of memoizing metrics for a specific type of node. A default implementation is provided, seeBasicMetricMemoizer.- Since:
- 6.0.0
- Author:
- Clément Fournier
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description DoublegetMemo(ParameterizedMetricKey<N> key)Fetch a memoized result for a metric and options.voidmemoize(ParameterizedMetricKey<N> key, double value)Memoizes a result for a metric and options.
-
-
-
Method Detail
-
getMemo
Double getMemo(ParameterizedMetricKey<N> key)
Fetch a memoized result for a metric and options.- Parameters:
key- The metric key parameterized with its options- Returns:
- The memoized result, or null if it wasn't found
-
memoize
void memoize(ParameterizedMetricKey<N> key, double value)
Memoizes a result for a metric and options.- Parameters:
key- The metric key parameterized with its optionsvalue- The value to store
-
-