changeset 7613:505737373ba4

BedQualityExporter: Use foreach instead of manual array loop.
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Thu, 28 Nov 2013 10:16:55 +0100
parents 61940bae77b5
children 3e3a4f44423a
files artifacts/src/main/java/org/dive4elements/river/exports/minfo/BedQualityExporter.java
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/exports/minfo/BedQualityExporter.java	Thu Nov 28 10:14:33 2013 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/minfo/BedQualityExporter.java	Thu Nov 28 10:16:55 2013 +0100
@@ -63,8 +63,8 @@
     private List<double[]> createDataRows() {
         TDoubleArrayList kms = new TDoubleArrayList();
         int cols = 1;
-        for (int i = 0; i < results.length; i++) {
-            BedDiameterResult[] beds = results[i].getBedResults();
+        for (BedQualityResult result : results) {
+            BedDiameterResult[] beds = result.getBedResults();
             for (int j = 0; j < beds.length; j++) {
                 TDoubleArrayList bkms = beds[j].getKms();
                 for (int k = 0, K = bkms.size(); k < K; k++) {
@@ -74,7 +74,7 @@
                     }
                 }
             }
-            BedloadDiameterResult[] loads = results[i].getBedloadResults();
+            BedloadDiameterResult[] loads = result.getBedloadResults();
             for (int j = 0; j < loads.length; j++) {
                 TDoubleArrayList lkms = loads[j].getKms();
                 for (int k = 0, L = lkms.size(); k < L; k++) {

http://dive4elements.wald.intevation.org