Mercurial > dive4elements > river
annotate flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/extreme/ExtremeCurveFacet.java @ 4338:88064d351bcc
ExtremeCurveFacet: Moved allocation of Access object to where its needed.
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Wed, 31 Oct 2012 14:08:38 +0100 |
parents | 09993be04c5e |
children | b0173cdbbe51 |
rev | line source |
---|---|
4314
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.flys.artifacts.model.extreme; |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
2 |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
3 import de.intevation.artifacts.Artifact; |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
4 import de.intevation.artifacts.CallContext; |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
5 |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
6 import de.intevation.flys.artifacts.FLYSArtifact; |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
7 |
4336
09993be04c5e
ExtremeCurveFacet: Set suggestedMaxQ in curve to be max value in segment + 5%.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4314
diff
changeset
|
8 import de.intevation.flys.artifacts.access.ExtremeAccess; |
4314
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
9 |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
10 import de.intevation.flys.artifacts.model.CalculationResult; |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
11 import de.intevation.flys.artifacts.model.DataFacet; |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
12 import de.intevation.flys.artifacts.model.FacetTypes; |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
13 import de.intevation.flys.artifacts.model.Parameters; |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
14 |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
15 import de.intevation.flys.artifacts.states.DefaultState.ComputeType; |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
16 |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
17 import de.intevation.flys.utils.KMIndex; |
4336
09993be04c5e
ExtremeCurveFacet: Set suggestedMaxQ in curve to be max value in segment + 5%.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4314
diff
changeset
|
18 import de.intevation.flys.utils.DoubleUtil; |
4314
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
19 |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
20 import org.apache.log4j.Logger; |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
21 |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
22 /** |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
23 * Facet to show the W|Q values. |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
24 */ |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
25 public class ExtremeCurveFacet |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
26 extends DataFacet |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
27 implements FacetTypes { |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
28 |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
29 /** House logger. */ |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
30 private static Logger logger = Logger.getLogger(ExtremeCurveFacet.class); |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
31 |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
32 |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
33 /** Trivial Constructor. */ |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
34 public ExtremeCurveFacet() { |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
35 } |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
36 |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
37 |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
38 /** |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
39 * @param description Description of the facet. |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
40 */ |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
41 public ExtremeCurveFacet(String description) { |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
42 super(0, EXTREME_WQ_CURVE, description, ComputeType.ADVANCE, null, null); |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
43 } |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
44 |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
45 |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
46 public ExtremeCurveFacet(int index, String description) { |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
47 super(index, EXTREME_WQ_CURVE, description, ComputeType.ADVANCE, null, null); |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
48 } |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
49 |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
50 |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
51 /** |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
52 * Returns the data (a curve/function) this facet provides at km given in context. |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
53 * |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
54 * @param artifact the owner artifact. |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
55 * @param context the CallContext. |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
56 * |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
57 * @return the data. |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
58 */ |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
59 @Override |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
60 public Object getData(Artifact artifact, CallContext context) { |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
61 logger.debug("ExtremeCurveFacet.getData"); |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
62 if (artifact instanceof FLYSArtifact) { |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
63 FLYSArtifact flys = (FLYSArtifact)artifact; |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
64 CalculationResult res = |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
65 (CalculationResult) flys.compute(context, |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
66 ComputeType.ADVANCE, |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
67 false); |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
68 |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
69 ExtremeResult result = (ExtremeResult) res.getData(); |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
70 double currentKm = |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
71 ((Double)context.getContextValue("currentKm")).doubleValue(); |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
72 |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
73 KMIndex<Curve> curves = result.getCurves(); |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
74 |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
75 KMIndex.Entry<Curve> curveEntry = curves.search(currentKm); |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
76 |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
77 if (curveEntry != null) { |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
78 logger.debug("A curve at km = " + currentKm); |
4336
09993be04c5e
ExtremeCurveFacet: Set suggestedMaxQ in curve to be max value in segment + 5%.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4314
diff
changeset
|
79 Curve c = curveEntry.getValue(); |
09993be04c5e
ExtremeCurveFacet: Set suggestedMaxQ in curve to be max value in segment + 5%.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4314
diff
changeset
|
80 // Find segment in which the curr. km is located. |
4338
88064d351bcc
ExtremeCurveFacet: Moved allocation of Access object to where its needed.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4336
diff
changeset
|
81 ExtremeAccess access = new ExtremeAccess(flys); |
88064d351bcc
ExtremeCurveFacet: Moved allocation of Access object to where its needed.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4336
diff
changeset
|
82 |
4336
09993be04c5e
ExtremeCurveFacet: Set suggestedMaxQ in curve to be max value in segment + 5%.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4314
diff
changeset
|
83 double[] ds = access.getValuesForRange(currentKm); |
09993be04c5e
ExtremeCurveFacet: Set suggestedMaxQ in curve to be max value in segment + 5%.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4314
diff
changeset
|
84 |
09993be04c5e
ExtremeCurveFacet: Set suggestedMaxQ in curve to be max value in segment + 5%.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4314
diff
changeset
|
85 if (ds != null) { |
09993be04c5e
ExtremeCurveFacet: Set suggestedMaxQ in curve to be max value in segment + 5%.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4314
diff
changeset
|
86 double m = DoubleUtil.maxInArray(ds); |
09993be04c5e
ExtremeCurveFacet: Set suggestedMaxQ in curve to be max value in segment + 5%.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4314
diff
changeset
|
87 // Add 5 percent. |
09993be04c5e
ExtremeCurveFacet: Set suggestedMaxQ in curve to be max value in segment + 5%.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4314
diff
changeset
|
88 m *= 1.05d; |
09993be04c5e
ExtremeCurveFacet: Set suggestedMaxQ in curve to be max value in segment + 5%.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4314
diff
changeset
|
89 c.setSuggestedMaxQ(m); |
09993be04c5e
ExtremeCurveFacet: Set suggestedMaxQ in curve to be max value in segment + 5%.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4314
diff
changeset
|
90 } |
09993be04c5e
ExtremeCurveFacet: Set suggestedMaxQ in curve to be max value in segment + 5%.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4314
diff
changeset
|
91 |
09993be04c5e
ExtremeCurveFacet: Set suggestedMaxQ in curve to be max value in segment + 5%.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4314
diff
changeset
|
92 return c; |
4314
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
93 } |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
94 else { |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
95 logger.debug("No curve at km = " + currentKm); |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
96 return null; |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
97 } |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
98 } |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
99 else { |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
100 logger.debug("Not an instance of FLYSArtifact / WINFOArtifact."); |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
101 return null; |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
102 } |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
103 } |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
104 |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
105 |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
106 /** |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
107 * Create a deep copy of this Facet. |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
108 * @return a deep copy. |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
109 */ |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
110 @Override |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
111 public ExtremeCurveFacet deepCopy() { |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
112 ExtremeCurveFacet copy = new ExtremeCurveFacet(); |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
113 copy.set(this); |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
114 return copy; |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
115 } |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
116 } |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
117 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |