Changeset 24889 in osm for applications/editors/josm/plugins/terracer/src
- Timestamp:
- 2010-12-27T21:51:57+01:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/terracer/src/terracer/TerracerAction.java
r24713 r24889 234 234 */ 235 235 class HousenumberNodeComparator implements Comparator<Node> { 236 private final Pattern pat = Pattern.compile("^( [0-9]+)");236 private final Pattern pat = Pattern.compile("^(\\d+)\\s*(.*)"); 237 237 238 238 /* … … 252 252 if (mat.find()) { 253 253 Integer node1Int = Integer.valueOf(mat.group(1)); 254 String node1Rest = mat.group(2); 254 255 mat = pat.matcher(node2String); 255 256 if (mat.find()) { 256 257 Integer node2Int = Integer.valueOf(mat.group(1)); 258 // If the numbers are the same, the rest has to make the decision, 259 // e.g. when comparing 23, 23a and 23b. 260 if (node1Int.equals(node2Int)) 261 { 262 String node2Rest = mat.group(2); 263 return node1Rest.compareTo(node2Rest); 264 } 257 265 258 266 return node1Int.compareTo(node2Int);
Note:
See TracChangeset
for help on using the changeset viewer.