comparison artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedHeightSingle.java @ 6149:3c8147ba35a6

Bed height: Removed braindead index determination code.
author Sascha L. Teichmann <teichmann@intevation.de>
date Sun, 02 Jun 2013 02:43:00 +0200
parents af13ceeba52a
children
comparison
equal deleted inserted replaced
6148:b12ec9f240bc 6149:3c8147ba35a6
49 public int getYear() { 49 public int getYear() {
50 return this.year; 50 return this.year;
51 } 51 }
52 52
53 public double getMorphWidth(int idx) { 53 public double getMorphWidth(int idx) {
54 return this.morphWidth.get(idx); 54 return this.morphWidth.getQuick(idx);
55 } 55 }
56 56
57 public double getDataGap(int idx) { 57 public double getDataGap(int idx) {
58 return this.data_gap.get(idx); 58 return this.data_gap.getQuick(idx);
59 } 59 }
60 60
61 public double getMorphWidth(double station) { 61 public double getMorphWidth(double station) {
62 if (this.station.indexOf(station) >= 0) { 62 int index = this.station.indexOf(station);
63 return this.morphWidth.get(this.station.indexOf(station)); 63 return index >= 0 ? morphWidth.getQuick(index): Double.NaN;
64 }
65 return Double.NaN;
66 } 64 }
67 65
68 public double getDataGap(double station) { 66 public double getDataGap(double station) {
69 if (this.station.indexOf(station) >= 0) { 67 int index = this.station.indexOf(station);
70 return this.getDataGap(this.station.indexOf(station)); 68 return index >= 0 ? data_gap.getQuick(index) : Double.NaN;
71 }
72 return Double.NaN;
73 } 69 }
74 70
75 public double[] getMorphWidths() { 71 public double[] getMorphWidths() {
76 return this.morphWidth.toNativeArray(); 72 return this.morphWidth.toNativeArray();
77 } 73 }

http://dive4elements.wald.intevation.org