Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationCalculationResults.java @ 9176:1614cb14308f
Work on calculations for S-Info flood duration workflow
author | mschaefer |
---|---|
date | Mon, 25 Jun 2018 19:21:11 +0200 |
parents | 9b2e46090099 |
children | a4121ec450d6 |
comparison
equal
deleted
inserted
replaced
9175:34dc0163ad2d | 9176:1614cb14308f |
---|---|
6 * This file is Free Software under the GNU AGPL (>=v3) | 6 * This file is Free Software under the GNU AGPL (>=v3) |
7 * and comes with ABSOLUTELY NO WARRANTY! Check out the | 7 * and comes with ABSOLUTELY NO WARRANTY! Check out the |
8 * documentation coming with Dive4Elements River for details. | 8 * documentation coming with Dive4Elements River for details. |
9 */ | 9 */ |
10 package org.dive4elements.river.artifacts.sinfo.flood_duration; | 10 package org.dive4elements.river.artifacts.sinfo.flood_duration; |
11 | |
12 import java.util.List; | |
11 | 13 |
12 import org.apache.commons.lang.math.DoubleRange; | 14 import org.apache.commons.lang.math.DoubleRange; |
13 import org.dive4elements.river.artifacts.common.AbstractCalculationExportableResult; | 15 import org.dive4elements.river.artifacts.common.AbstractCalculationExportableResult; |
14 import org.dive4elements.river.artifacts.common.AbstractCalculationResults; | 16 import org.dive4elements.river.artifacts.common.AbstractCalculationResults; |
15 import org.dive4elements.river.artifacts.sinfo.util.RiverInfo; | 17 import org.dive4elements.river.artifacts.sinfo.util.RiverInfo; |
19 */ | 21 */ |
20 final class FloodDurationCalculationResults extends AbstractCalculationResults<AbstractCalculationExportableResult<FloodDurationCalculationResults>> { | 22 final class FloodDurationCalculationResults extends AbstractCalculationResults<AbstractCalculationExportableResult<FloodDurationCalculationResults>> { |
21 | 23 |
22 private static final long serialVersionUID = 1L; | 24 private static final long serialVersionUID = 1L; |
23 | 25 |
24 private final String riverside; | 26 public FloodDurationCalculationResults(final String calcModeLabel, final String user, final RiverInfo river, final DoubleRange calcRange) { |
25 | |
26 public FloodDurationCalculationResults(final String calcModeLabel, final String user, final RiverInfo river, final DoubleRange calcRange, | |
27 final String riverside) { | |
28 super(calcModeLabel, user, river, calcRange); | 27 super(calcModeLabel, user, river, calcRange); |
29 this.riverside = riverside; // lieber in Result? | |
30 } | 28 } |
31 | 29 |
30 /** | |
31 * We know that this type of results only has one result member, so we can directly access it. | |
32 */ | |
33 public FloodDurationCalculationResult getResult() { | |
34 final List<AbstractCalculationExportableResult<FloodDurationCalculationResults>> results = getResults(); | |
35 if (results.size() < 1) | |
36 return null; | |
37 | |
38 return (FloodDurationCalculationResult) results.get(0); | |
39 } | |
32 } | 40 } |