changeset 7930:d3a4b0d5bcd8

Small Java related cosmetics.
author Sascha L. Teichmann <teichmann@intevation.de>
date Thu, 12 Jun 2014 19:16:30 +0200
parents 86f5a1577cc6
children b4117b8adb79
files artifacts/src/main/java/org/dive4elements/river/artifacts/GaugeDischargeArtifact.java artifacts/src/main/java/org/dive4elements/river/artifacts/model/WQ.java artifacts/src/main/java/org/dive4elements/river/exports/DischargeCurveGenerator.java
diffstat 3 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/GaugeDischargeArtifact.java	Thu Jun 12 12:29:03 2014 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/GaugeDischargeArtifact.java	Thu Jun 12 19:16:30 2014 +0200
@@ -25,6 +25,7 @@
 import org.dive4elements.artifacts.CallMeta;
 
 import org.dive4elements.river.artifacts.model.FacetTypes;
+import org.dive4elements.river.artifacts.model.W;
 import org.dive4elements.river.artifacts.model.WQKms;
 
 import org.dive4elements.river.artifacts.states.DefaultState;
@@ -221,7 +222,7 @@
         }
         double [] kms = new double[values[0].length];
         Arrays.fill(kms, gauge.getStation().doubleValue());
-        res.add(new WQKms(kms, values[0], values[1], name, WQKms.CENTIMETER_AT_GAUGE));
+        res.add(new WQKms(kms, values[0], values[1], name, W.CENTIMETER_AT_GAUGE));
 
         return new CalculationResult(
             res.toArray(new WQKms[res.size()]),
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/WQ.java	Thu Jun 12 12:29:03 2014 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/WQ.java	Thu Jun 12 19:16:30 2014 +0200
@@ -121,13 +121,13 @@
      * If a conversion takes place converted is set to true
      */
     public static WQ getFixedWQforExportAtGauge(WQ wq, BigDecimal datum) {
-        if (wq.getReferenceSystem() == wq.CENTIMETER_AT_GAUGE) {
+        if (wq.getReferenceSystem() == W.CENTIMETER_AT_GAUGE) {
             // Do nothing
             return wq;
         }
         // If we convert we work on a copy to avoid side effects.
         WQ ret = new WQ(wq.size(), wq.getName());
-        ret.setReferenceSystem(wq.CENTIMETER_AT_GAUGE);
+        ret.setReferenceSystem(W.CENTIMETER_AT_GAUGE);
 
         // When we convert and have a datum we have a calculated
         // result at a gauge so we must subtract the datum.
--- a/artifacts/src/main/java/org/dive4elements/river/exports/DischargeCurveGenerator.java	Thu Jun 12 12:29:03 2014 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/DischargeCurveGenerator.java	Thu Jun 12 19:16:30 2014 +0200
@@ -374,7 +374,7 @@
      * (in imported data they are set to -1 symbolically).
      * Return false if data is null or empty
      */
-    private boolean hasNoDischarge(double[][] data) {
+    private static boolean hasNoDischarge(double[][] data) {
         if (data == null || data.length == 0) {
             return false;
         }

http://dive4elements.wald.intevation.org