Interface MetricKey<N extends Node>

  • Type Parameters:
    N - Type of nodes the metric can be computed on
    All Superinterfaces:
    DataMap.DataKey<MetricKey<N>,​Double>

    public interface MetricKey<N extends Node>
    extends DataMap.DataKey<MetricKey<N>,​Double>
    Key identifying a metric. Such keys must implement the hashCode method. Enums are well fitted to serve as metric keys.
    Since:
    5.8.0
    Author:
    Clément Fournier
    • Method Detail

      • name

        String name()
        Returns the name of the metric.
        Returns:
        The name of the metric
      • getCalculator

        Metric<N> getCalculator()
        Returns the object used to calculate the metric.
        Returns:
        The calculator
      • supports

        boolean supports​(N node)
        Returns true if the metric held by this key can be computed on this node.
        Parameters:
        node - The node to test
        Returns:
        Whether or not the metric can be computed on this node