Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/DurationWaterlevel.java @ 9357:5ce50640688c
S-Info flood duration: fixed error report output name, changed duration from int to double, added formatter
author | mschaefer |
---|---|
date | Wed, 01 Aug 2018 13:18:45 +0200 |
parents | 83ebeb620b5a |
children | 8da911b5169c |
comparison
equal
deleted
inserted
replaced
9356:202fd59b4f21 | 9357:5ce50640688c |
---|---|
21 private static final long serialVersionUID = 1L; | 21 private static final long serialVersionUID = 1L; |
22 | 22 |
23 private final double w; | 23 private final double w; |
24 private final double q; | 24 private final double q; |
25 private final String bezeichnung; | 25 private final String bezeichnung; |
26 private final int floodDurDaysPerYear; | 26 private final double floodDurDaysPerYear; |
27 | 27 |
28 public DurationWaterlevel(final double w, final int floodDurDaysPerYear, final double q, final String bezeichnung) { | 28 public DurationWaterlevel(final double w, final double floodDurDaysPerYear, final double q, final String bezeichnung) { |
29 this.w = w; | 29 this.w = w; |
30 this.q = q; | 30 this.q = q; |
31 this.bezeichnung = bezeichnung; | 31 this.bezeichnung = bezeichnung; |
32 this.floodDurDaysPerYear = floodDurDaysPerYear; | 32 this.floodDurDaysPerYear = floodDurDaysPerYear; |
33 } | 33 } |
38 | 38 |
39 public double getDischarge() { | 39 public double getDischarge() { |
40 return this.q; | 40 return this.q; |
41 } | 41 } |
42 | 42 |
43 public int getFloodDurDaysPerYear() { | 43 public double getFloodDurDaysPerYear() { |
44 return this.floodDurDaysPerYear; | 44 return this.floodDurDaysPerYear; |
45 } | 45 } |
46 | 46 |
47 public String getFloodDurDaysPerYearFormatted() { | 47 public String getFloodDurDaysPerYearFormatted(final NumberFormat durFormatter) { |
48 return String.valueOf(this.floodDurDaysPerYear); | 48 return durFormatter.format(this.floodDurDaysPerYear); |
49 } | 49 } |
50 | 50 |
51 public String getBezeichnung() { | 51 public String getBezeichnung() { |
52 return this.bezeichnung; | 52 return this.bezeichnung; |
53 } | 53 } |