Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationCalculationResults.java @ 9195:a4121ec450d6
'ca.'-issue
ExportContextCSV+PDF separated
uinfo.inundationduration url export
author | gernotbelger |
---|---|
date | Fri, 29 Jun 2018 14:52:54 +0200 |
parents | 1614cb14308f |
children | b4402594213b |
comparison
equal
deleted
inserted
replaced
9191:f692f5a0536a | 9195:a4121ec450d6 |
---|---|
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 | 11 |
12 import java.util.List; | |
13 | |
14 import org.apache.commons.lang.math.DoubleRange; | 12 import org.apache.commons.lang.math.DoubleRange; |
15 import org.dive4elements.river.artifacts.common.AbstractCalculationExportableResult; | |
16 import org.dive4elements.river.artifacts.common.AbstractCalculationResults; | 13 import org.dive4elements.river.artifacts.common.AbstractCalculationResults; |
17 import org.dive4elements.river.artifacts.sinfo.util.RiverInfo; | 14 import org.dive4elements.river.artifacts.sinfo.util.RiverInfo; |
18 | 15 |
19 /** | 16 /** |
20 * @author Gernot Belger | 17 * @author Gernot Belger |
21 */ | 18 */ |
22 final class FloodDurationCalculationResults extends AbstractCalculationResults<AbstractCalculationExportableResult<FloodDurationCalculationResults>> { | 19 final class FloodDurationCalculationResults extends AbstractCalculationResults<FloodDurationCalculationResult> { |
23 | 20 |
24 private static final long serialVersionUID = 1L; | 21 private static final long serialVersionUID = 1L; |
25 | 22 |
26 public FloodDurationCalculationResults(final String calcModeLabel, final String user, final RiverInfo river, final DoubleRange calcRange) { | 23 public FloodDurationCalculationResults(final String calcModeLabel, final String user, final RiverInfo river, final DoubleRange calcRange) { |
27 super(calcModeLabel, user, river, calcRange); | 24 super(calcModeLabel, user, river, calcRange); |
28 } | 25 } |
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 } | |
40 } | 26 } |