comparison artifacts/src/main/java/org/dive4elements/river/artifacts/model/WQKms.java @ 6599:38ee580a30cb

Add getFirstLastKM utiltity function to WQKms I found this useful.
author Andre Heinecke <aheinecke@intevation.de>
date Thu, 18 Jul 2013 13:13:51 +0200
parents 5fda7065b74a
children 3c4efd4b2c19
comparison
equal deleted inserted replaced
6598:ca56c4e6a755 6599:38ee580a30cb
141 public String toString() { 141 public String toString() {
142 double from = getKm(0); 142 double from = getKm(0);
143 double to = getKm(size()-1); 143 double to = getKm(size()-1);
144 return from + " - " + to; 144 return from + " - " + to;
145 } 145 }
146
147 /**
148 * Returns an array of two double values the first and last kilometer.
149 *
150 * @return a double array with the first and last km
151 */
152 public double[] getFirstLastKM() {
153 /* Behold the first km might be larger then the last! */
154 return new double[] {getKm(0), getKm(size()-1)};
155 }
146 } 156 }
147 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : 157 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org