Changeset 30737 in osm for applications/editors/josm/plugins/OpeningHoursEditor
- Timestamp:
- 2014-10-18T23:07:52+02:00 (10 years ago)
- Location:
- applications/editors/josm/plugins/OpeningHoursEditor/src/org/openstreetmap/josm/plugins/ohe
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/OpeningHoursEditor/src/org/openstreetmap/josm/plugins/ohe/OhePlugin.java
r30609 r30737 121 121 // copied from 122 122 // org.openstreetmap.josm.gui.dialogs.properties.PropertiesDialog[rev4079][line802] 123 Map<String, Integer> keyCount = new HashMap< String, Integer>();124 Map<String, Map<String, Integer>> valueCount = new TreeMap< String, Map<String, Integer>>();123 Map<String, Integer> keyCount = new HashMap<>(); 124 Map<String, Map<String, Integer>> valueCount = new TreeMap<>(); 125 125 for (OsmPrimitive osm : selection) { 126 126 for (String key : osm.keySet()) { … … 131 131 v.put(value, v.containsKey(value) ? v.get(value) + 1 : 1); 132 132 } else { 133 TreeMap<String, Integer> v = new TreeMap< String, Integer>();133 TreeMap<String, Integer> v = new TreeMap<>(); 134 134 v.put(value, 1); 135 135 valueCount.put(key, v); … … 325 325 Main.main.undoRedo.add(new ChangePropertyCommand(selection, newkey, value)); 326 326 } else { 327 Collection<Command> commands = new Vector< Command>();327 Collection<Command> commands = new Vector<>(); 328 328 commands.add(new ChangePropertyCommand(selection, key, null)); 329 329 if (value.equals(tr("<different>"))) { 330 HashMap<String, Vector<OsmPrimitive>> map = new HashMap< String, Vector<OsmPrimitive>>();330 HashMap<String, Vector<OsmPrimitive>> map = new HashMap<>(); 331 331 for (OsmPrimitive osm : selection) { 332 332 String val = osm.get(key); … … 335 335 map.get(val).add(osm); 336 336 } else { 337 Vector<OsmPrimitive> v = new Vector< OsmPrimitive>();337 Vector<OsmPrimitive> v = new Vector<>(); 338 338 v.add(osm); 339 339 map.put(val, v); -
applications/editors/josm/plugins/OpeningHoursEditor/src/org/openstreetmap/josm/plugins/ohe/OpeningTimeUtils.java
r30117 r30737 15 15 */ 16 16 public static ArrayList<int[]> convert(ArrayList<DateTime> dateTimes) { 17 ArrayList<int[]> ret = new ArrayList< int[]>(); // the list which is17 ArrayList<int[]> ret = new ArrayList<>(); // the list which is 18 18 // returned 19 19 for (int i = 0; i < dateTimes.size(); ++i) { // iterate over every entry 20 20 DateTime dateTime = dateTimes.get(i); 21 ArrayList<DateTime> newDateTimes = new ArrayList< DateTime>();21 ArrayList<DateTime> newDateTimes = new ArrayList<>(); 22 22 23 23 // test if the given entry is a single dayspan 24 24 if (dateTime.daySpans.size() == 1 && dateTime.daySpans.get(0).isSpan()) { 25 ArrayList<DaySpan> partDaySpans = new ArrayList< DaySpan>();25 ArrayList<DaySpan> partDaySpans = new ArrayList<>(); 26 26 int start_day = dateTime.daySpans.get(0).startDay; 27 27 -
applications/editors/josm/plugins/OpeningHoursEditor/src/org/openstreetmap/josm/plugins/ohe/gui/OheEditor.java
r30117 r30737 191 191 192 192 setEnabled(true); 193 timeRects = new ArrayList< TimeRect>();193 timeRects = new ArrayList<>(); 194 194 if (time != null) { 195 195 for (int[] timeRectValues : time) {
Note:
See TracChangeset
for help on using the changeset viewer.