Changeset 7005 in josm for trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java
- Timestamp:
- 2014-04-26T17:39:23+02:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java
r6986 r7005 69 69 } 70 70 71 final List<TagCheck> checks = new ArrayList< TagCheck>();71 final List<TagCheck> checks = new ArrayList<>(); 72 72 73 73 static class TagCheck implements Predicate<OsmPrimitive> { 74 74 protected final MapCSSRule rule; 75 protected final List<PrimitiveToTag> change = new ArrayList< PrimitiveToTag>();76 protected final Map<String, String> keyChange = new LinkedHashMap< String, String>();77 protected final List<String> alternatives = new ArrayList< String>();78 protected final Map<Instruction.AssignmentInstruction, Severity> errors = new HashMap< Instruction.AssignmentInstruction, Severity>();79 protected final Map<String, Boolean> assertions = new HashMap< String, Boolean>();75 protected final List<PrimitiveToTag> change = new ArrayList<>(); 76 protected final Map<String, String> keyChange = new LinkedHashMap<>(); 77 protected final List<String> alternatives = new ArrayList<>(); 78 protected final Map<Instruction.AssignmentInstruction, Severity> errors = new HashMap<>(); 79 protected final Map<String, Boolean> assertions = new HashMap<>(); 80 80 81 81 TagCheck(MapCSSRule rule) { … … 180 180 // Ignore "meta" rule(s) from external rules of JOSM wiki 181 181 removeMetaRules(source); 182 return new ArrayList< TagCheck>(Utils.transform(source.rules, new Utils.Function<MapCSSRule, TagCheck>() {182 return new ArrayList<>(Utils.transform(source.rules, new Utils.Function<MapCSSRule, TagCheck>() { 183 183 @Override 184 184 public TagCheck apply(MapCSSRule x) { … … 297 297 } 298 298 final Selector matchingSelector = whichSelectorMatchesPrimitive(p); 299 Collection<Command> cmds = new LinkedList< Command>();299 Collection<Command> cmds = new LinkedList<>(); 300 300 for (PrimitiveToTag toTag : change) { 301 301 final Tag tag = toTag.apply(p); … … 416 416 */ 417 417 public Collection<TestError> getErrorsForPrimitive(OsmPrimitive p, boolean includeOtherSeverity) { 418 final ArrayList<TestError> r = new ArrayList< TestError>();418 final ArrayList<TestError> r = new ArrayList<>(); 419 419 final Environment env = new Environment(p, new MultiCascade(), Environment.DEFAULT_LAYER, null); 420 420 for (TagCheck check : checks) {
Note:
See TracChangeset
for help on using the changeset viewer.