Mercurial > dive4elements > river
diff artifacts/src/main/java/org/dive4elements/river/artifacts/common/AbstractCalculationResult.java @ 9150:23945061daec
gigantic refactoring: exporter, result, results
to support multiple jaspers -> collisions
author | gernotbelger |
---|---|
date | Thu, 14 Jun 2018 16:56:31 +0200 |
parents | e3b3ce32c825 |
children | b4402594213b |
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/common/AbstractCalculationResult.java Thu Jun 14 15:12:25 2018 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/common/AbstractCalculationResult.java Thu Jun 14 16:56:31 2018 +0200 @@ -15,7 +15,6 @@ import java.util.Collections; import java.util.List; -import org.dive4elements.river.artifacts.common.IResultType; import gnu.trove.TDoubleArrayList; /** @@ -29,38 +28,35 @@ private final String label; - - - public AbstractCalculationResult(final String label, final Collection<ResultRow> rows) { - this.label = label; + public AbstractCalculationResult(final String label, final Collection<ResultRow> rows) { + this.label = label; this.rows = new ArrayList<>(rows); } public final String getLabel() { return this.label; } - public boolean isEmpty() { return this.rows.isEmpty(); } - public final void addRow(final ResultRow resultRow) { - this.rows.add(resultRow); - } + // public final void addRow(final ResultRow resultRow) { + // this.rows.add(resultRow); + // } public final Collection<ResultRow> getRows() { return Collections.unmodifiableCollection(this.rows); } - public final double[][] getStationPoints(final IResultType type) { //gehört die Methode hier rein? oder in erbende Klassen? + public final double[][] getStationPoints(final IResultType type) { // gehört die Methode hier rein? oder in erbende Klassen? final TDoubleArrayList xPoints = new TDoubleArrayList(this.rows.size()); final TDoubleArrayList yPoints = new TDoubleArrayList(this.rows.size()); for (final ResultRow row : this.rows) { - final double station = row.getDoubleValue(GeneralResultType.station); //TODO: move "station" (and others) to common + final double station = row.getDoubleValue(GeneralResultType.station); // TODO: move "station" (and others) to common final double value = row.getDoubleValue(type); xPoints.add(station);