Ignore:
Timestamp:
2015-05-17T17:52:15+02:00 (4 years ago)
Author:
Don-vip
Message:

performance - use of EnumMap / EnumSet

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/history/RelationMemberListTableCellRenderer.java

    r8308 r8388  
    66import java.awt.Color;
    77import java.awt.Component;
    8 import java.util.HashMap;
     8import java.util.EnumMap;
    99import java.util.Map;
    1010
     
    2020
    2121/**
    22  * The {@link TableCellRenderer} for a list of relation members in {@link HistoryBrowser}
    23  *
    24  *
     22 * The {@link TableCellRenderer} for a list of relation members in {@link HistoryBrowser}.
     23 * @since 1709
    2524 */
    2625public class RelationMemberListTableCellRenderer extends JLabel implements TableCellRenderer {
     
    3837    public RelationMemberListTableCellRenderer() {
    3938        setOpaque(true);
    40         icons = new HashMap<>();
     39        icons = new EnumMap<>(OsmPrimitiveType.class);
    4140        icons.put(OsmPrimitiveType.NODE, ImageProvider.get("data", "node"));
    4241        icons.put(OsmPrimitiveType.WAY, ImageProvider.get("data", "way"));
Note: See TracChangeset for help on using the changeset viewer.