1 package com.stateofflow.eclipse.metrics.export.csv;
2
3 import java.io.PrintWriter;
4
5 import com.stateofflow.eclipse.metrics.collator.MetricsCollator;
6 import com.stateofflow.eclipse.metrics.location.MetricLocation;
7 import com.stateofflow.eclipse.metrics.location.comparator.LocationComparator;
8 import com.stateofflow.eclipse.metrics.metric.MetricId;
9
10 class BodyWriter {
11 public void write(final PrintWriter writer, final MetricId[] metricIds, final MetricsCollator collator) {
12 collator.forEach(new LocationComparator() {
13 protected int compareParticular(final MetricLocation l1, final MetricLocation l2) {
14 return 0;
15 }
16 }, new MetricLocation.Closure() {
17 public void execute(final MetricLocation location) {
18 new RowWriter(writer, location).write(metricIds, collator);
19 }
20 });
21 }
22 }
23