Changeset 8338 in josm for trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetItems.java
- Timestamp:
- 2015-05-07T01:27:41+02:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetItems.java
r8332 r8338 30 30 import java.util.Map; 31 31 import java.util.Map.Entry; 32 import java.util.Set; 33 import java.util.SortedSet; 32 34 import java.util.TreeSet; 33 35 … … 81 83 82 84 // 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); 84 86 85 87 /** … … 167 169 168 170 public static class Role { 169 public EnumSet<TaggingPresetType> types;171 public Set<TaggingPresetType> types; 170 172 public String key; 171 173 /** The text to display */ … … 290 292 291 293 public static class Usage { 292 private TreeSet<String> values;294 private SortedSet<String> values; 293 295 private boolean hadKeys = false; 294 296 private boolean hadEmpty = false; … … 1396 1398 } else { 1397 1399 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))); 1399 1401 ListModel<PresetListEntry> lm = getModel(); 1400 1402 int[] intParts = new int[lm.getSize()]; … … 1429 1431 } 1430 1432 1431 public static EnumSet<TaggingPresetType> getType(String types) throws SAXException {1433 public static Set<TaggingPresetType> getType(String types) throws SAXException { 1432 1434 if (TYPE_CACHE.containsKey(types)) 1433 1435 return TYPE_CACHE.get(types); 1434 EnumSet<TaggingPresetType> result = EnumSet.noneOf(TaggingPresetType.class);1436 Set<TaggingPresetType> result = EnumSet.noneOf(TaggingPresetType.class); 1435 1437 for (String type : Arrays.asList(types.split(","))) { 1436 1438 try {
Note:
See TracChangeset
for help on using the changeset viewer.