Mercurial > dive4elements > river
changeset 9158:4a41b7fba4da
Added a getter for any gauge belonging to the km range
author | mschaefer |
---|---|
date | Tue, 19 Jun 2018 14:20:52 +0200 |
parents | f9bb5d0a6ff3 |
children | 64e56a51db3f |
files | artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/common/RiverInfoProvider.java |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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))