Changeset 13678 in josm for trunk/src/org
- Timestamp:
- 2018-04-25T01:16:49+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/validation/tests/CrossingWays.java
r13671 r13678 42 42 */ 43 43 private enum WayType { 44 BUILDING, HIGHWAY, RESIDENTIAL_AREA, WATERWAY, WAY 44 BUILDING, HIGHWAY, RESIDENTIAL_AREA, WATERWAY, WAY; 45 46 static WayType of(Way w) { 47 if (isBuilding(w)) 48 return BUILDING; 49 else if (w.hasKey(CrossingWays.HIGHWAY)) 50 return HIGHWAY; 51 else if (isResidentialArea(w)) 52 return RESIDENTIAL_AREA; 53 else if (w.hasKey(CrossingWays.WATERWAY)) 54 return WATERWAY; 55 else 56 return WAY; 57 } 45 58 } 46 59 … … 104 117 } 105 118 106 private static WayType getWayType(Way w) {107 if (isBuilding(w))108 return WayType.BUILDING;109 else if (w.hasKey(HIGHWAY))110 return WayType.HIGHWAY;111 else if (isResidentialArea(w))112 return WayType.RESIDENTIAL_AREA;113 else if (w.hasKey(WATERWAY))114 return WayType.WATERWAY;115 else116 return WayType.WAY;117 }118 119 119 @Override 120 120 String createMessage(Way w1, Way w2) { 121 WayType[] types = { getWayType(w1), getWayType(w2)};121 WayType[] types = {WayType.of(w1), WayType.of(w2)}; 122 122 Arrays.sort(types); 123 123
Note:
See TracChangeset
for help on using the changeset viewer.