Package org.openstreetmap.josm.data.osm
Class FilterWorker
- java.lang.Object
-
- org.openstreetmap.josm.data.osm.FilterWorker
-
public final class FilterWorker extends Object
Class for applyingFilter
s toIPrimitive
s. Provides a bridge between Filter GUI and the data.
-
-
Constructor Summary
Constructors Modifier Constructor Description private
FilterWorker()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T extends IPrimitive & IFilterablePrimitive>
booleanclearFilterFlags(Collection<T> prims)
Clear all filter flags, i.e. turn off filters.private static <T extends IPrimitive & IFilterablePrimitive>
booleandoExecuteFilters(Collection<T> all, FilterMatcher filterMatcher)
static <T extends IPrimitive & IFilterablePrimitive>
booleanexecuteFilters(Collection<T> all, Filter... filters)
Apply the filters to the primitives of the data set.static <T extends IPrimitive & IFilterablePrimitive>
booleanexecuteFilters(Collection<T> all, FilterMatcher filterMatcher)
Apply the filters to the primitives of the data set.static <T extends IPrimitive & IFilterablePrimitive>
booleanexecuteFilters(T primitive, FilterMatcher filterMatcher)
Apply the filters to a single primitive.
-
-
-
Constructor Detail
-
FilterWorker
private FilterWorker()
-
-
Method Detail
-
executeFilters
public static <T extends IPrimitive & IFilterablePrimitive> boolean executeFilters(Collection<T> all, Filter... filters) throws SearchParseError
Apply the filters to the primitives of the data set.- Type Parameters:
T
- The primitive type- Parameters:
all
- the collection of primitives for that the filter state should be updatedfilters
- the filters- Returns:
- true, if the filter state (normal / disabled / hidden) of any primitive has changed in the process
- Throws:
SearchParseError
- if the search expression in a filter cannot be parsed- Since:
- 12383, 17862 (generics)
-
executeFilters
public static <T extends IPrimitive & IFilterablePrimitive> boolean executeFilters(Collection<T> all, FilterMatcher filterMatcher)
Apply the filters to the primitives of the data set.- Type Parameters:
T
- The primitive type- Parameters:
all
- the collection of primitives for that the filter state should be updatedfilterMatcher
- the FilterMatcher- Returns:
- true, if the filter state (normal / disabled / hidden) of any primitive has changed in the process
- Since:
- 17862 (generics)
-
doExecuteFilters
private static <T extends IPrimitive & IFilterablePrimitive> boolean doExecuteFilters(Collection<T> all, FilterMatcher filterMatcher)
-
executeFilters
public static <T extends IPrimitive & IFilterablePrimitive> boolean executeFilters(T primitive, FilterMatcher filterMatcher)
Apply the filters to a single primitive.- Type Parameters:
T
- the primitive type- Parameters:
primitive
- the primitivefilterMatcher
- the FilterMatcher- Returns:
- true, if the filter state (normal / disabled / hidden) of the primitive has changed in the process
- Since:
- 17862 (generics)
-
clearFilterFlags
public static <T extends IPrimitive & IFilterablePrimitive> boolean clearFilterFlags(Collection<T> prims)
Clear all filter flags, i.e. turn off filters.- Type Parameters:
T
- the primitive type- Parameters:
prims
- the primitives- Returns:
- true, if the filter state (normal / disabled / hidden) of any primitive has changed in the process
- Since:
- 12388 (signature)
-
-