comparison artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadCalculation.java @ 7065:b17634649e61

Simplify code a bit.
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Thu, 19 Sep 2013 12:53:11 +0200
parents fabb5e7a3b66
children fe32a7f9655e
comparison
equal deleted inserted replaced
7064:fabb5e7a3b66 7065:b17634649e61
241 calculateEpochKm(epochLoads, resLoad, kms.get(j)); 241 calculateEpochKm(epochLoads, resLoad, kms.get(j));
242 } 242 }
243 resLoad.setDescription(""); 243 resLoad.setDescription("");
244 resLoad.setEpoch(true); 244 resLoad.setEpoch(true);
245 245
246 SedimentLoadResult result;
247 SedimentLoad sl = calculateTotalLoad(resLoad, this.epoch[i][0]); 246 SedimentLoad sl = calculateTotalLoad(resLoad, this.epoch[i][0]);
247
248 if (this.unit.equals("m3_per_a")) { 248 if (this.unit.equals("m3_per_a")) {
249 SedimentLoad slu = calculateUnit(sl, this.epoch[i][0]); 249 sl = calculateUnit(sl, this.epoch[i][0]);
250 result = new SedimentLoadResult( 250 }
251 this.epoch[i][0], 251
252 this.epoch[i][1], 252 return new SedimentLoadResult(
253 slu); 253 this.epoch[i][0],
254 } 254 this.epoch[i][1],
255 else { 255 sl);
256 result = new SedimentLoadResult(
257 this.epoch[i][0],
258 this.epoch[i][1],
259 sl);
260 }
261
262 return result;
263 } 256 }
264 257
265 /** 258 /**
266 * Calculate/Fetch values at off. epochs. 259 * Calculate/Fetch values at off. epochs.
267 * @param i index in epochs. 260 * @param i index in epochs.

http://dive4elements.wald.intevation.org