Ignore:
Timestamp:
2017-06-10T00:50:51+02:00 (7 years ago)
Author:
Don-vip
Message:

see #14929 - new methods to ease the direct handling of filters

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/FilterWorker.java

    r10716 r12383  
    55import java.util.Collections;
    66
     7import org.openstreetmap.josm.actions.search.SearchCompiler.ParseError;
    78import org.openstreetmap.josm.data.osm.FilterMatcher.FilterType;
    89import org.openstreetmap.josm.tools.SubclassFilteredCollection;
     
    1920    private FilterWorker() {
    2021        // 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));
    2135    }
    2236
Note: See TracChangeset for help on using the changeset viewer.