comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/GaugeRange.java @ 3421:c44ff50f4970

FixA: Added a list of gauges to the output of the fixings overview service which intersect the selected fixings. flys-artifacts/trunk@5075 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Thu, 19 Jul 2012 21:12:57 +0000
parents 08230c76cd92
children 05eeedc5b156
comparison
equal deleted inserted replaced
3420:7f7ab030a4e3 3421:c44ff50f4970
23 this.sector = sector; 23 this.sector = sector;
24 this.value = value; 24 this.value = value;
25 } 25 }
26 } // class Sector 26 } // class Sector
27 27
28 protected String name;
29
28 protected int gaugeId; 30 protected int gaugeId;
29 31
30 protected Map<String, Double> mainValues; 32 protected Map<String, Double> mainValues;
31 protected List<Sector> sectors; 33 protected List<Sector> sectors;
32 34
33 public GaugeRange() { 35 public GaugeRange() {
34 } 36 }
35 37
36 public GaugeRange(double start, double end, int gaugeId) { 38 public GaugeRange(double start, double end, int gaugeId) {
39 this(start, end, null, gaugeId);
40 }
41
42 public GaugeRange(
43 double start,
44 double end,
45 String name,
46 int gaugeId
47 ) {
37 super(start, end); 48 super(start, end);
49 this.name = name;
38 this.gaugeId = gaugeId; 50 this.gaugeId = gaugeId;
39 mainValues = new HashMap<String, Double>(); 51 mainValues = new HashMap<String, Double>();
40 sectors = new ArrayList<Sector>(3); 52 sectors = new ArrayList<Sector>(3);
41 } 53 }
42 54
93 } 105 }
94 } 106 }
95 return sectors.size(); 107 return sectors.size();
96 } 108 }
97 109
110 public String getName() {
111 return name;
112 }
113
114 public void setName(String name) {
115 this.name = name;
116 }
117
98 public String toString() { 118 public String toString() {
99 StringBuilder sb = new StringBuilder("sectors: ["); 119 StringBuilder sb = new StringBuilder("sectors: [");
100 120
101 for (int i = 0, S = sectors.size(); i < S; ++i) { 121 for (int i = 0, S = sectors.size(); i < S; ++i) {
102 if (i > 0) sb.append(", "); 122 if (i > 0) sb.append(", ");

http://dive4elements.wald.intevation.org