Changeset 16336 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2020-04-18T10:52:42+02:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/OverpassTurboQueryWizard.java
r16264 r16336 12 12 import java.util.regex.Pattern; 13 13 import java.util.stream.Collectors; 14 import java.util.stream.Stream; 14 15 15 16 import org.openstreetmap.josm.data.osm.OsmPrimitiveType; … … 89 90 final EnumSet<OsmPrimitiveType> types = EnumSet.noneOf(OsmPrimitiveType.class); 90 91 final String query = constructQuery(conjunction, types); 91 for (Object type : types.isEmpty() || types.size() == 3 ? Collections.singleton("nwr") : types) { 92 queryLines.add(" " + type + query + queryLineSuffix + ";"); 93 } 92 final Stream<String> typeStream = types.isEmpty() || types.size() == 3 93 ? Stream.of("nwr") 94 : types.stream().map(OsmPrimitiveType::getAPIName); 95 typeStream.forEach(type -> queryLines.add(" " + type + query + queryLineSuffix + ";")); 94 96 } 95 97 queryLines.add(");");
Note:
See TracChangeset
for help on using the changeset viewer.