Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/MainValuesArtifact.java @ 6523:5afb1cda5885
Minor refactoring in MainValuesArtifact.
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Tue, 02 Jul 2013 07:09:19 +0200 |
parents | a0078e5e3b39 |
children | 641ec405c4ac |
comparison
equal
deleted
inserted
replaced
6522:263ea424f24c | 6523:5afb1cda5885 |
---|---|
401 Calculation c = new Calculation(); | 401 Calculation c = new Calculation(); |
402 | 402 |
403 double gaugeStation = gauge.getStation().doubleValue(); | 403 double gaugeStation = gauge.getStation().doubleValue(); |
404 double w_out[] = {0.0f}; | 404 double w_out[] = {0.0f}; |
405 double q_out[] = {0.0f}; | 405 double q_out[] = {0.0f}; |
406 double kms[] = {getLocation()}; | |
407 if (gauge != null) { | 406 if (gauge != null) { |
408 List<MainValue> orig = gauge.getMainValues(); | 407 List<MainValue> orig = gauge.getMainValues(); |
409 for (MainValue mv : orig) { | 408 for (MainValue mv : orig) { |
410 if (atGauge) { | 409 if (atGauge) { |
411 if (mv.getMainValue().getType().getName().equals("W")) { | 410 if (mv.getMainValue().getType().getName().equals("W")) { |
429 return filteredList; | 428 return filteredList; |
430 } | 429 } |
431 | 430 |
432 | 431 |
433 /** | 432 /** |
433 * Get a list of "W" main values. | |
434 * @param atGauge if true, do not interpolate | |
435 * @return list of W main values. | |
436 */ | |
437 public List<NamedDouble> getMainValuesW(boolean atGauge) { | |
438 return getMainValuesW(atGauge, new double[] {getLocation()}); | |
439 } | |
440 | |
441 | |
442 /** | |
434 * Returns the name of this artifact ('mainvalue'). | 443 * Returns the name of this artifact ('mainvalue'). |
435 * | 444 * |
436 * @return 'mainvalue' | 445 * @return 'mainvalue' |
437 */ | 446 */ |
438 public String getName() { | 447 public String getName() { |