static { final Window[] windows = Window.values(); final ValueMetric[] valueMetrics = ValueMetric.values(); final DurationMetric[] durationMetrics = DurationMetric.values(); ALL_METRICS = new ArrayList<MetricAttributeDefinition>( windows.length * (valueMetrics.length + durationMetrics.length)); for (final Window window : windows) { for (final DurationMetric metric : durationMetrics) { final MetricAttributeDefinition attrDefn = new DurationMetricAttributeDefinition(metric, window); ALL_METRICS.add(attrDefn); } for (final ValueMetric metric : valueMetrics) { final MetricAttributeDefinition attrDefn = new ValueMetricAttributeDefinition(metric, window); ALL_METRICS.add(attrDefn); } } }
/** * @param metric the value metric (cannot be <code>null</code>) * @param window the metrics window (cannot be <code>null</code>) */ ValueMetricAttributeDefinition(final ValueMetric metric, final Window window) { super(attributeName(metric.getLiteral(), window)); this.handler = new GetValueMetric(metric, window); }