use of ee.ria.xroad.monitor.common.dto.SimpleMetricDto in project X-Road by nordic-institute.
the class MetricTypes method of.
/**
* MetricSetType factory
*/
public static MetricSetType of(MetricSetDto metrics) {
final MetricSetType metricSet = new MetricSetType();
metricSet.setName(metrics.getName());
for (MetricDto metricDto : metrics.getMetrics()) {
if (metricDto instanceof MetricSetDto) {
metricSet.getMetrics().add(of((MetricSetDto) metricDto));
} else if (metricDto instanceof HistogramDto) {
metricSet.getMetrics().add(toMetricType((HistogramDto) metricDto));
} else if (metricDto instanceof SimpleMetricDto) {
metricSet.getMetrics().add(toMetricType((SimpleMetricDto<?>) metricDto));
}
}
return metricSet;
}
Aggregations