Ignore:
Timestamp:
2015-05-07T01:27:41+02:00 (9 years ago)
Author:
Don-vip
Message:

fix squid:S1319 - Declarations should use Java collection interfaces rather than specific implementation classes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetItems.java

    r8332 r8338  
    3030import java.util.Map;
    3131import java.util.Map.Entry;
     32import java.util.Set;
     33import java.util.SortedSet;
    3234import java.util.TreeSet;
    3335
     
    8183
    8284    // cache the parsing of types using a LRU cache (http://java-planet.blogspot.com/2005/08/how-to-set-up-simple-lru-cache-using.html)
    83     private static final Map<String,EnumSet<TaggingPresetType>> TYPE_CACHE = new LinkedHashMap<>(16, 1.1f, true);
     85    private static final Map<String,Set<TaggingPresetType>> TYPE_CACHE = new LinkedHashMap<>(16, 1.1f, true);
    8486
    8587    /**
     
    167169
    168170    public static class Role {
    169         public EnumSet<TaggingPresetType> types;
     171        public Set<TaggingPresetType> types;
    170172        public String key;
    171173        /** The text to display */
     
    290292
    291293    public static class Usage {
    292         private TreeSet<String> values;
     294        private SortedSet<String> values;
    293295        private boolean hadKeys = false;
    294296        private boolean hadEmpty = false;
     
    13961398            } else {
    13971399                String s = o.toString();
    1398                 TreeSet<String> parts = new TreeSet<>(Arrays.asList(s.split(delimiter)));
     1400                Set<String> parts = new TreeSet<>(Arrays.asList(s.split(delimiter)));
    13991401                ListModel<PresetListEntry> lm = getModel();
    14001402                int[] intParts = new int[lm.getSize()];
     
    14291431    }
    14301432
    1431     public static EnumSet<TaggingPresetType> getType(String types) throws SAXException {
     1433    public static Set<TaggingPresetType> getType(String types) throws SAXException {
    14321434        if (TYPE_CACHE.containsKey(types))
    14331435            return TYPE_CACHE.get(types);
    1434         EnumSet<TaggingPresetType> result = EnumSet.noneOf(TaggingPresetType.class);
     1436        Set<TaggingPresetType> result = EnumSet.noneOf(TaggingPresetType.class);
    14351437        for (String type : Arrays.asList(types.split(","))) {
    14361438            try {
Note: See TracChangeset for help on using the changeset viewer.