Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/collections/FLYSArtifactCollection.java @ 1718:defe2cfeefa5
FLYSArtifactCollection: Small optimizations
flys-artifacts/trunk@2996 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Mon, 17 Oct 2011 16:04:14 +0000 |
parents | 755a890ecf0e |
children | 62efd1288e34 |
comparison
equal
deleted
inserted
replaced
1717:755a890ecf0e | 1718:defe2cfeefa5 |
---|---|
764 | 764 |
765 | 765 |
766 /** | 766 /** |
767 * Inner class to structure/order the themes of a chart. | 767 * Inner class to structure/order the themes of a chart. |
768 */ | 768 */ |
769 private class ThemeList { | 769 private static class ThemeList { |
770 private Logger logger = Logger.getLogger(ThemeList.class); | 770 private Logger logger = Logger.getLogger(ThemeList.class); |
771 protected Map<Integer, ManagedFacet> themes; | 771 protected Map<Integer, ManagedFacet> themes; |
772 | 772 |
773 public ThemeList(Document output) { | 773 public ThemeList(Document output) { |
774 themes = new HashMap<Integer, ManagedFacet>(); | 774 themes = new HashMap<Integer, ManagedFacet>(); |
794 | 794 |
795 for (int i = 0; i < num; i++) { | 795 for (int i = 0; i < num; i++) { |
796 Element theme = (Element) themeList.item(i); | 796 Element theme = (Element) themeList.item(i); |
797 | 797 |
798 ManagedDomFacet facet = new ManagedDomFacet(theme); | 798 ManagedDomFacet facet = new ManagedDomFacet(theme); |
799 themes.put(new Integer(facet.getPosition()-1), facet); | 799 themes.put(Integer.valueOf(facet.getPosition()-1), facet); |
800 } | 800 } |
801 } | 801 } |
802 | 802 |
803 public ManagedFacet get(int idx) { | 803 public ManagedFacet get(int idx) { |
804 return themes.get(new Integer(idx)); | 804 return themes.get(Integer.valueOf(idx)); |
805 } | 805 } |
806 | 806 |
807 public int size() { | 807 public int size() { |
808 return themes.size(); | 808 return themes.size(); |
809 } | 809 } |