Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/GaugeFinder.java @ 5379:61bf64b102bc mapgenfix
Merge with default branch
author | Christian Lins <christian.lins@intevation.de> |
---|---|
date | Fri, 22 Mar 2013 11:25:54 +0100 |
parents | 61f4d4164a30 |
children |
comparison
equal
deleted
inserted
replaced
5175:cfc5540a4eec | 5379:61bf64b102bc |
---|---|
9 import org.hibernate.SQLQuery; | 9 import org.hibernate.SQLQuery; |
10 import org.hibernate.Session; | 10 import org.hibernate.Session; |
11 | 11 |
12 import org.hibernate.type.StandardBasicTypes; | 12 import org.hibernate.type.StandardBasicTypes; |
13 | 13 |
14 /** Find Gauges and respective Q main values. */ | |
14 public class GaugeFinder | 15 public class GaugeFinder |
15 implements Serializable | 16 implements Serializable |
16 { | 17 { |
17 private static Logger log = Logger.getLogger(GaugeFinder.class); | 18 private static Logger log = Logger.getLogger(GaugeFinder.class); |
18 | 19 |
60 | 61 |
61 public void setIsKmUp(boolean isKmUp) { | 62 public void setIsKmUp(boolean isKmUp) { |
62 this.isKmUp = isKmUp; | 63 this.isKmUp = isKmUp; |
63 } | 64 } |
64 | 65 |
66 | |
67 /** Find GaugeRange at kilometer. */ | |
65 public GaugeRange find(double km) { | 68 public GaugeRange find(double km) { |
66 for (GaugeRange gauge: gauges) { | 69 for (GaugeRange gauge: gauges) { |
67 if (gauge.inside(km)) { | 70 if (gauge.inside(km)) { |
68 return gauge; | 71 return gauge; |
69 } | 72 } |