Class MetricSet


  • @Immutable
    public class MetricSet
    extends java.lang.Object
    Models a metric set containing a set of metrics and child metric sets.
    Author:
    gjoranv
    • Constructor Summary

      Constructors 
      Constructor Description
      MetricSet​(java.lang.String id, java.util.Collection<Metric> metrics)  
      MetricSet​(java.lang.String id, java.util.Collection<Metric> metrics, java.util.Collection<MetricSet> children)  
    • Constructor Detail

      • MetricSet

        public MetricSet​(java.lang.String id,
                         java.util.Collection<Metric> metrics,
                         java.util.Collection<MetricSet> children)
      • MetricSet

        public MetricSet​(java.lang.String id,
                         java.util.Collection<Metric> metrics)
    • Method Detail

      • emptyMetricSet

        public static MetricSet emptyMetricSet()
      • getId

        public final java.lang.String getId()
      • getMetrics

        public final java.util.Map<java.lang.String,​Metric> getMetrics()
        Returns all metrics in this set, including all metrics in any contained metric sets.
        Joins this set's metrics with its child sets into a named flat map of metrics. In the case of duplicate metrics, the metrics directly defined in this set takes precedence with respect to output name, description and dimension value (even if they are empty), while new dimensions from the children will be added.
        Returns:
        All metrics contained in this set.
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object