Package net.sourceforge.pmd.lang.metrics
Class ParameterizedMetricKey<N extends Node>
- java.lang.Object
-
- net.sourceforge.pmd.lang.metrics.ParameterizedMetricKey<N>
-
- Type Parameters:
N
- Type of node on which the memoized metric can be computed
public final class ParameterizedMetricKey<N extends Node> extends java.lang.Object
Represents a key parameterized with its options. Used to index memoization maps.- Since:
- 5.8.0
- Author:
- Clément Fournier
-
-
Field Summary
Fields Modifier and Type Field Description MetricKey<N>
key
The metric key.MetricOptions
options
The options of the metric.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
static <N extends Node>
ParameterizedMetricKey<N>getInstance(MetricKey<N> key, MetricOptions options)
Builds a parameterized metric key.int
hashCode()
java.lang.String
toString()
-
-
-
Field Detail
-
options
public final MetricOptions options
The options of the metric.
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
getInstance
public static <N extends Node> ParameterizedMetricKey<N> getInstance(MetricKey<N> key, MetricOptions options)
Builds a parameterized metric key.- Type Parameters:
N
- The type of node of the metric key- Parameters:
key
- The keyoptions
- The options- Returns:
- An instance of parameterized metric key corresponding to the parameters
-
-