Changeset 30737 in osm for applications/editors/josm/plugins/roadsigns/src/org/openstreetmap
- Timestamp:
- 2014-10-18T23:07:52+02:00 (10 years ago)
- Location:
- applications/editors/josm/plugins/roadsigns/src/org/openstreetmap/josm/plugins/roadsigns
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/roadsigns/src/org/openstreetmap/josm/plugins/roadsigns/ParametrizedString.java
r22420 r30737 22 22 */ 23 23 public class ParametrizedString { 24 final List<StringOrParameter> token = new ArrayList< StringOrParameter>();24 final List<StringOrParameter> token = new ArrayList<>(); 25 25 26 26 /** -
applications/editors/josm/plugins/roadsigns/src/org/openstreetmap/josm/plugins/roadsigns/RoadSignInputDialog.java
r30532 r30737 166 166 167 167 private Command createCommand(Collection<OsmPrimitive> selPrim) { 168 List<Command> cmds = new LinkedList< Command>();168 List<Command> cmds = new LinkedList<>(); 169 169 for (int i=0; i<previewModel.getRowCount(); i++) { 170 170 String key = (String) previewModel.getValueAt(i, 0); … … 272 272 */ 273 273 public class SignSelection { 274 private final LinkedList<SignCombination> combos=new LinkedList< SignCombination>();274 private final LinkedList<SignCombination> combos=new LinkedList<>(); 275 275 276 276 public void remove(SignCombination sc) { … … 333 333 for (SignWrapper sw : sc.signs) { 334 334 if (swFind == sw) { 335 return new Pair< Integer, Integer>(selIdx, combIdx);335 return new Pair<>(selIdx, combIdx); 336 336 } 337 337 combIdx++; … … 378 378 379 379 public SignCombination() { 380 signs = new LinkedList< SignWrapper>();380 signs = new LinkedList<>(); 381 381 } 382 382 … … 428 428 String signRef; 429 429 JPanel paramsPanel; 430 Map<String, String> paramValues = new HashMap< String, String>();430 Map<String, String> paramValues = new HashMap<>(); 431 431 public SignWrapper(Sign sign) { 432 432 this.sign = sign; … … 575 575 576 576 public class PreviewTableModel extends AbstractTableModel { 577 private List<String> keys = new ArrayList< String>();578 private List<String> values = new ArrayList< String>();577 private List<String> keys = new ArrayList<>(); 578 private List<String> values = new ArrayList<>(); 579 579 580 580 int rows=3; … … 607 607 */ 608 608 public void update() { 609 final TreeMap<String, String> map= new TreeMap< String, String>();609 final TreeMap<String, String> map= new TreeMap<>(); 610 610 String traffic_sign = ""; 611 611 612 612 for (SignCombination sc : sel.combos) { 613 final Map<String, String> env = new HashMap< String, String>();613 final Map<String, String> env = new HashMap<>(); 614 614 String combo_traffic_sign = ""; 615 615 … … 621 621 String key; 622 622 String default_value; 623 List<String> values = new ArrayList< String>();624 List<String> conditions = new ArrayList< String>();623 List<String> values = new ArrayList<>(); 624 List<String> conditions = new ArrayList<>(); 625 625 //String ident; 626 626 public TagEvaluater(Tag t) { … … 653 653 return Collections.singletonMap(key, value); 654 654 else { 655 Map<String, String> result = new HashMap< String, String>();655 Map<String, String> result = new HashMap<>(); 656 656 for (String c : conditions) { 657 657 result.put(key+":"+c, value); … … 662 662 } 663 663 664 Map<String, TagEvaluater> tags = new LinkedHashMap< String, TagEvaluater>();664 Map<String, TagEvaluater> tags = new LinkedHashMap<>(); 665 665 for (SignWrapper sw : sc.signs) { 666 666 for (Map.Entry<String,String> entry : sw.paramValues.entrySet()) { -
applications/editors/josm/plugins/roadsigns/src/org/openstreetmap/josm/plugins/roadsigns/RoadSignsPlugin.java
r30495 r30737 157 157 Collection<String> customIconDirs = null; 158 158 if (customIconDirsStr != null) { 159 customIconDirs = new ArrayList< String>(Arrays.asList(customIconDirsStr.split(",")));159 customIconDirs = new ArrayList<>(Arrays.asList(customIconDirsStr.split(","))); 160 160 } else { 161 161 customIconDirs = Main.pref.getCollection("plugin.roadsigns.icon.sources", null); 162 162 } 163 163 if (customIconDirs != null) { 164 customIconDirs = new ArrayList< String>(customIconDirs);164 customIconDirs = new ArrayList<>(customIconDirs); 165 165 } else { 166 customIconDirs = new ArrayList< String>();166 customIconDirs = new ArrayList<>(); 167 167 } 168 168 // add icon directory relative to preset file -
applications/editors/josm/plugins/roadsigns/src/org/openstreetmap/josm/plugins/roadsigns/RoadSignsReader.java
r30319 r30737 234 234 } 235 235 public void wireSupplements() throws XmlParsingException { 236 Map<String, Sign> map = new HashMap< String, Sign>();236 Map<String, Sign> map = new HashMap<>(); 237 237 for (Sign sign : allSigns) { 238 238 if (map.get(sign.id) != null) … … 309 309 public List<Sign> parse() throws SAXException, IOException { 310 310 SignParser parser = new SignParser(); 311 parser.allSigns = new ArrayList< Sign>();312 parser.supplementIds = new HashMap< Sign, List<String>>();311 parser.allSigns = new ArrayList<>(); 312 parser.supplementIds = new HashMap<>(); 313 313 try { 314 314 SAXParserFactory factory = SAXParserFactory.newInstance(); … … 318 318 String filterPref = Main.pref.get("plugin.roadsigns.preset.filter"); 319 319 if (filterPref.equals("useful")) { 320 List<Sign> filtered = new ArrayList< Sign>();320 List<Sign> filtered = new ArrayList<>(); 321 321 for (Sign s : parser.allSigns) { 322 322 if (s.isUseful()) { -
applications/editors/josm/plugins/roadsigns/src/org/openstreetmap/josm/plugins/roadsigns/Sign.java
r29230 r30737 27 27 public String name; 28 28 public String long_name; 29 public List<Tag> tags = new ArrayList< Tag>();30 public List<Sign> supplements = new ArrayList< Sign>();31 public List<SignParameter> params = new ArrayList< SignParameter>();29 public List<Tag> tags = new ArrayList<>(); 30 public List<Sign> supplements = new ArrayList<>(); 31 public List<SignParameter> params = new ArrayList<>(); 32 32 public boolean isSupplementing; 33 33 public String loc_wiki; -
applications/editors/josm/plugins/roadsigns/src/org/openstreetmap/josm/plugins/roadsigns/javacc/ParamStringScanner.java
r21967 r30737 18 18 String val; 19 19 Token t; 20 List<StringOrParameter> lst = new ArrayList< StringOrParameter>();20 List<StringOrParameter> lst = new ArrayList<>(); 21 21 label_1: 22 22 while (true) { -
applications/editors/josm/plugins/roadsigns/src/org/openstreetmap/josm/plugins/roadsigns/javacc/ParamStringScannerTokenManager.java
r23192 r30737 1 1 /* Generated By:JavaCC: Do not edit this line. ParamStringScannerTokenManager.java */ 2 2 package org.openstreetmap.josm.plugins.roadsigns.javacc; 3 import java.util.ArrayList;4 import java.util.List;5 import org.openstreetmap.josm.plugins.roadsigns.ParametrizedString.Prm;6 import org.openstreetmap.josm.plugins.roadsigns.ParametrizedString.Str;7 import org.openstreetmap.josm.plugins.roadsigns.ParametrizedString.StringOrParameter;8 3 9 4 /** Token Manager. */
Note:
See TracChangeset
for help on using the changeset viewer.