Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/StaticWKmsArtifact.java @ 3405:b0ba96bbf01d
Use Integer.parseInt() instead of Integer.valueOf() + Autounboxing.
flys-artifacts/trunk@5057 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Thu, 19 Jul 2012 09:37:52 +0000 |
parents | d9af29a4bb85 |
children | afc7bfb4800b |
comparison
equal
deleted
inserted
replaced
3404:d7b065b88f10 | 3405:b0ba96bbf01d |
---|---|
95 if (code != null) { | 95 if (code != null) { |
96 String [] parts = code.split("-"); | 96 String [] parts = code.split("-"); |
97 | 97 |
98 if (parts.length >= 4) { | 98 if (parts.length >= 4) { |
99 int col = -1; | 99 int col = -1; |
100 int wst = Integer.valueOf(parts[3]); | 100 int wst = Integer.parseInt(parts[3]); |
101 | 101 |
102 if (!parts[2].equals("A")) { | 102 if (!parts[2].equals("A")) { |
103 col = Integer.valueOf(parts[2]); | 103 col = Integer.parseInt(parts[2]); |
104 } | 104 } |
105 | 105 |
106 addStringData("col_pos", parts[2]); | 106 addStringData("col_pos", parts[2]); |
107 addStringData("wst_id", parts[3]); | 107 addStringData("wst_id", parts[3]); |
108 | 108 |
234 */ | 234 */ |
235 public WKms getWKms(int idx) { | 235 public WKms getWKms(int idx) { |
236 logger.debug("StaticWKmsArtifact.getWKms"); | 236 logger.debug("StaticWKmsArtifact.getWKms"); |
237 | 237 |
238 return WKmsFactory.getWKms( | 238 return WKmsFactory.getWKms( |
239 Integer.valueOf(getDataAsString("col_pos")), | 239 Integer.parseInt(getDataAsString("col_pos")), |
240 Integer.valueOf(getDataAsString("wst_id"))); | 240 Integer.parseInt(getDataAsString("wst_id"))); |
241 } | 241 } |
242 | 242 |
243 | 243 |
244 /** | 244 /** |
245 * Returns W at Km of WKms, linearly interpolated. | 245 * Returns W at Km of WKms, linearly interpolated. |