[PATCH 4 of 6] Added a getter for any gauge belonging to the km range

Wald Commits scm-commit at wald.intevation.org
Tue Jun 19 14:25:11 CEST 2018


# HG changeset patch
# User mschaefer
# Date 1529410852 -7200
# Node ID 4a41b7fba4da4791909148c25c676643512f215a
# Parent  f9bb5d0a6ff3cb890aab35e6a940ed57f4ee436c
Added a getter for any gauge belonging to the km range

diff -r f9bb5d0a6ff3 -r 4a41b7fba4da artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/common/RiverInfoProvider.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/common/RiverInfoProvider.java	Tue Jun 19 14:19:32 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/common/RiverInfoProvider.java	Tue Jun 19 14:20:52 2018 +0200
@@ -97,7 +97,11 @@
 
         // REMARK: using same logic as in WaterlevelExporter here
 
-        if (this.showAllGauges)
+        return getGauge(km, this.showAllGauges);
+    }
+
+    public Gauge getGauge(final double km, final boolean allGauges) {
+        if (allGauges)
             return this.gaugeIndex.findGauge(km);
 
         if ((this.refGauge != null) && this.refGauge.getRange().contains(km))


More information about the Dive4Elements-commits mailing list