Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/collections/CollectionAttribute.java @ 3555:b1912514e0f5
s/container.size() == 0/container.isEmpty()/
flys-artifacts/trunk@5149 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Sat, 28 Jul 2012 21:48:15 +0000 |
parents | 2a8919e0ed28 |
children | 975f608dd254 |
comparison
equal
deleted
inserted
replaced
3554:9b356ed24411 | 3555:b1912514e0f5 |
---|---|
181 if (name == null || name.length() == 0) { | 181 if (name == null || name.length() == 0) { |
182 logger.warn("No Output name specified."); | 182 logger.warn("No Output name specified."); |
183 return null; | 183 return null; |
184 } | 184 } |
185 | 185 |
186 if (outputMap == null || outputMap.size() == 0) { | 186 if (outputMap == null || outputMap.isEmpty()) { |
187 logger.warn("Tried to retrieve Output, but no Outputs existing."); | 187 logger.warn("Tried to retrieve Output, but no Outputs existing."); |
188 return null; | 188 return null; |
189 } | 189 } |
190 | 190 |
191 return outputMap.get(name); | 191 return outputMap.get(name); |
215 | 215 |
216 | 216 |
217 public List<Facet> getFacets() { | 217 public List<Facet> getFacets() { |
218 List<Facet> allFacets = new ArrayList<Facet>(); | 218 List<Facet> allFacets = new ArrayList<Facet>(); |
219 | 219 |
220 if (outputMap == null || outputMap.size() == 0) { | 220 if (outputMap == null || outputMap.isEmpty()) { |
221 logger.warn("No Outputs existing."); | 221 logger.warn("No Outputs existing."); |
222 return allFacets; | 222 return allFacets; |
223 } | 223 } |
224 | 224 |
225 Set<String> outputNames = outputMap.keySet(); | 225 Set<String> outputNames = outputMap.keySet(); |
231 return allFacets; | 231 return allFacets; |
232 } | 232 } |
233 | 233 |
234 | 234 |
235 protected void appendOutputs(Element root) { | 235 protected void appendOutputs(Element root) { |
236 if (outputMap == null || outputMap.size() == 0) { | 236 if (outputMap == null || outputMap.isEmpty()) { |
237 logger.warn("No outputs to append."); | 237 logger.warn("No outputs to append."); |
238 return; | 238 return; |
239 } | 239 } |
240 | 240 |
241 logger.debug("Append " + outputMap.size() + " Output Elements."); | 241 logger.debug("Append " + outputMap.size() + " Output Elements."); |
279 settings.toXML(root); | 279 settings.toXML(root); |
280 } | 280 } |
281 | 281 |
282 | 282 |
283 protected void appendFacets(Element root, List<Facet> facets) { | 283 protected void appendFacets(Element root, List<Facet> facets) { |
284 if (facets == null || facets.size() == 0) { | 284 if (facets == null || facets.isEmpty()) { |
285 logger.warn("Tried to append 0 Facets."); | 285 logger.warn("Tried to append 0 Facets."); |
286 return; | 286 return; |
287 } | 287 } |
288 | 288 |
289 Document owner = root.getOwnerDocument(); | 289 Document owner = root.getOwnerDocument(); |