Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/states/ComputationRangeState.java @ 8617:b8493c4bdf0c
Remove duplicated code.
This is an exact copy of the createItem method from the base class.
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Wed, 25 Mar 2015 18:22:34 +0100 |
parents | e4606eae8ea5 |
children | a5e450af498b |
comparison
equal
deleted
inserted
replaced
8616:594b0bbc7011 | 8617:b8493c4bdf0c |
---|---|
119 return new Element[] { step }; | 119 return new Element[] { step }; |
120 } | 120 } |
121 | 121 |
122 } | 122 } |
123 | 123 |
124 | |
125 protected Element createItem(XMLUtils.ElementCreator cr, Object obj) { | |
126 Element item = ProtocolUtils.createArtNode(cr, "item", null, null); | |
127 Element label = ProtocolUtils.createArtNode(cr, "label", null, null); | |
128 Element value = ProtocolUtils.createArtNode(cr, "value", null, null); | |
129 | |
130 String[] arr = (String[]) obj; | |
131 | |
132 label.setTextContent(arr[0]); | |
133 value.setTextContent(arr[1]); | |
134 | |
135 item.appendChild(label); | |
136 item.appendChild(value); | |
137 | |
138 return item; | |
139 } | |
140 | |
141 | |
142 @Override | 124 @Override |
143 protected double[] getMinMax(Artifact artifact) { | 125 protected double[] getMinMax(Artifact artifact) { |
144 D4EArtifact flysArtifact = (D4EArtifact) artifact; | 126 D4EArtifact flysArtifact = (D4EArtifact) artifact; |
145 return RiverUtils.getRiverMinMax(flysArtifact); | 127 return RiverUtils.getRiverMinMax(flysArtifact); |
146 } | 128 } |