8916
|
1 /** Copyright (C) 2017 by Bundesanstalt für Gewässerkunde |
|
2 * Software engineering by |
|
3 * Björnsen Beratende Ingenieure GmbH |
|
4 * Dr. Schumacher Ingenieurbüro für Wasser und Umwelt |
|
5 * |
|
6 * This file is Free Software under the GNU AGPL (>=v3) |
|
7 * and comes with ABSOLUTELY NO WARRANTY! Check out the |
|
8 * documentation coming with Dive4Elements River for details. |
|
9 */ |
|
10 package org.dive4elements.river.artifacts.sinfo.common; |
|
11 |
|
12 import java.io.Serializable; |
|
13 import java.util.ArrayList; |
|
14 import java.util.Collections; |
|
15 import java.util.List; |
|
16 |
|
17 import org.apache.commons.lang.math.DoubleRange; |
|
18 import org.dive4elements.river.artifacts.sinfo.util.RiverInfo; |
|
19 |
|
20 /** |
|
21 * @author Gernot Belger |
|
22 */ |
|
23 public abstract class AbstractSInfoCalculationResults<ROW extends AbstractSInfoResultRow, RESULT extends AbstractSInfoCalculationResult<ROW>> implements Serializable { |
|
24 |
|
25 private static final long serialVersionUID = 1L; |
|
26 |
|
27 private final List<RESULT> results = new ArrayList<>(); |
|
28 |
|
29 private final String calcModeLabel; |
|
30 |
|
31 private final String user; |
|
32 |
|
33 private final RiverInfo river; |
|
34 |
|
35 private final DoubleRange calcRange; |
|
36 |
|
37 public AbstractSInfoCalculationResults(final String calcModeLabel, final String user, final RiverInfo river, final DoubleRange calcRange) { |
|
38 this.calcModeLabel = calcModeLabel; |
|
39 this.user = user; |
|
40 this.river = river; |
|
41 this.calcRange = calcRange; |
|
42 } |
|
43 |
|
44 public final String getCalcModeLabel() { |
|
45 return this.calcModeLabel; |
|
46 } |
|
47 |
|
48 public final String getUser() { |
|
49 return this.user; |
|
50 } |
|
51 |
|
52 public final RiverInfo getRiver() { |
|
53 return this.river; |
|
54 } |
|
55 |
|
56 public final DoubleRange getCalcRange() { |
|
57 return this.calcRange; |
|
58 } |
|
59 |
|
60 public final void addResult(final RESULT result) { |
|
61 this.results.add(result); |
|
62 } |
|
63 |
|
64 public final List<RESULT> getResults() { |
|
65 return Collections.unmodifiableList(this.results); |
|
66 } |
|
67 } |