Changeset 12383 in josm
- Timestamp:
- 2017-06-10T00:50:51+02:00 (7 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/data/osm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/FilterMatcher.java
r12121 r12383 325 325 } 326 326 327 /** 328 * Returns a new {@code FilterMatcher} containing the given filters. 329 * @param filters filters to add to the resulting filter matcher 330 * @return a new {@code FilterMatcher} containing the given filters 331 * @throws ParseError if the search expression in a filter cannot be parsed 332 * @since 12383 333 */ 334 public static FilterMatcher of(Filter... filters) throws ParseError { 335 FilterMatcher result = new FilterMatcher(); 336 for (Filter filter : filters) { 337 result.add(filter); 338 } 339 return result; 340 } 327 341 } -
trunk/src/org/openstreetmap/josm/data/osm/FilterWorker.java
r10716 r12383 5 5 import java.util.Collections; 6 6 7 import org.openstreetmap.josm.actions.search.SearchCompiler.ParseError; 7 8 import org.openstreetmap.josm.data.osm.FilterMatcher.FilterType; 8 9 import org.openstreetmap.josm.tools.SubclassFilteredCollection; … … 19 20 private FilterWorker() { 20 21 // Hide default constructor for utils classes 22 } 23 24 /** 25 * Apply the filters to the primitives of the data set. 26 * 27 * @param all the collection of primitives for that the filter state should be updated 28 * @param filters the filters 29 * @return true, if the filter state (normal / disabled / hidden) of any primitive has changed in the process 30 * @throws ParseError if the search expression in a filter cannot be parsed 31 * @since 12383 32 */ 33 public static boolean executeFilters(Collection<OsmPrimitive> all, Filter... filters) throws ParseError { 34 return executeFilters(all, FilterMatcher.of(filters)); 21 35 } 22 36
Note:
See TracChangeset
for help on using the changeset viewer.