comparison artifacts/src/main/java/org/dive4elements/river/artifacts/states/WaterlevelData.java @ 9365:ba1e2e8f05d1

sinfo.flowdepth Results.isShowRefGauge==false->spalte ausblenden; result.isShowRefGauge==false&&results.isShowRefGauge==true->result.refGauge=""
author gernotbelger
date Thu, 02 Aug 2018 15:02:27 +0200
parents 392745cccede
children
comparison
equal deleted inserted replaced
9364:0124d67ce5ab 9365:ba1e2e8f05d1
27 private final int year; 27 private final int year;
28 28
29 /** If <code>true</code>, tabular export will show gauges for every station, else only for the first gauge */ 29 /** If <code>true</code>, tabular export will show gauges for every station, else only for the first gauge */
30 private final boolean showAllGauges; 30 private final boolean showAllGauges;
31 31
32 private boolean showRefGauges; 32 private final boolean showRefGauges;
33 33
34 public WaterlevelData(final WKms wkms, final int year, final boolean showAllGauges, boolean showRefGauges) { 34 public WaterlevelData(final WKms wkms, final int year, final boolean showAllGauges, final boolean showRefGauges) {
35 this(wkms.getName(), wkms, year, showAllGauges, showRefGauges); 35 this(wkms.getName(), wkms, year, showAllGauges, showRefGauges);
36 } 36 }
37 37
38 private WaterlevelData(final String name, final WKms wkms, final int year, final boolean showAllGauges, boolean showRefGauges) { 38 private WaterlevelData(final String name, final WKms wkms, final int year, final boolean showAllGauges, final boolean showRefGauges) {
39 this.name = name; 39 this.name = name;
40 this.wkms = wkms; 40 this.wkms = wkms;
41 this.year = year; 41 this.year = year;
42 this.showAllGauges = showAllGauges; 42 this.showAllGauges = showAllGauges;
43 this.showRefGauges = showRefGauges; 43 this.showRefGauges = showRefGauges;
47 if (Double.isNaN(from) || Double.isNaN(to)) { 47 if (Double.isNaN(from) || Double.isNaN(to)) {
48 return this; 48 return this;
49 } 49 }
50 50
51 final WKms filteredWkms = this.wkms.filteredKms(from, to); 51 final WKms filteredWkms = this.wkms.filteredKms(from, to);
52 return new WaterlevelData(this.name, filteredWkms, this.year, this.showAllGauges ,showRefGauges); 52 return new WaterlevelData(this.name, filteredWkms, this.year, this.showAllGauges, this.showRefGauges);
53 } 53 }
54 54
55 public WaterlevelData withName(final String nameToSet) { 55 public WaterlevelData withName(final String nameToSet) {
56 return new WaterlevelData(nameToSet, this.wkms, this.year, this.showAllGauges, showRefGauges); 56 return new WaterlevelData(nameToSet, this.wkms, this.year, this.showAllGauges, this.showRefGauges);
57 } 57 }
58 58
59 public String getName() { 59 public String getName() {
60 return this.name; 60 return this.name;
61 } 61 }
65 } 65 }
66 66
67 public boolean isShowAllGauges() { 67 public boolean isShowAllGauges() {
68 return this.showAllGauges; 68 return this.showAllGauges;
69 } 69 }
70 70
71 public boolean isShowRefGauges() { 71 public boolean isShowRefGauges() {
72 return this.showRefGauges; 72 return this.showRefGauges;
73 } 73 }
74 74
75 public int getYear() { 75 public int getYear() {

http://dive4elements.wald.intevation.org