- Timestamp:
- 2021-05-06T22:37:43+02:00 (4 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/Tagged.java
r17662 r17876 6 6 import java.util.Map; 7 7 import java.util.Objects; 8 import java.util.stream.Collectors; 8 9 import java.util.stream.Stream; 9 10 … … 234 235 } 235 236 237 238 /** 239 * Returns a Tagged instance for the given tag collection 240 * @param tags the tag collection 241 * @return a Tagged instance for the given tag collection 242 */ 243 static Tagged ofTags(Collection<Tag> tags) { 244 return ofMap(tags.stream().collect(Collectors.toMap(Tag::getKey, Tag::getValue, (a, b) -> a))); 245 } 246 236 247 /** 237 248 * Returns a Tagged instance for the given tag map -
trunk/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetItemGuiSupport.java
r17875 r17876 4 4 import org.openstreetmap.josm.data.osm.OsmPrimitive; 5 5 import org.openstreetmap.josm.data.osm.Tag; 6 import org.openstreetmap.josm.data.osm.Tagged; 6 7 import org.openstreetmap.josm.data.osm.search.SearchCompiler; 7 8 import org.openstreetmap.josm.gui.tagging.presets.items.KeyedItem; … … 107 108 @Override 108 109 public boolean evaluateCondition(SearchCompiler.Match condition) { 109 throw new UnsupportedOperationException(); 110 Tagged tagged = Tagged.ofTags(changedTagsSupplier.get()); 111 return condition.match(tagged); 110 112 } 111 113
Note:
See TracChangeset
for help on using the changeset viewer.