- All Known Subinterfaces:
ClassNameFilter
,DiscoveryFilter<T>
,PackageNameFilter
,PostDiscoveryFilter
- All Known Implementing Classes:
EngineFilter
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A
Filter
can be applied to determine if an object should be
included or excluded in a result set.
For example, tests may be filtered during or after test discovery based on certain criteria.
Clients should not implement this interface directly but rather one of its subinterfaces.
- Since:
- 1.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T,
V> Filter<T> adaptFilter
(Filter<V> adaptee, Function<T, V> converter) Return a filter that will include elements if and only if the adaptedFilter
includes the value converted using the suppliedFunction
.Apply this filter to the supplied object.static <T> Filter<T>
composeFilters
(Collection<? extends Filter<T>> filters) Return a filter that will include elements if and only if all of the filters in the supplied collection offilters
include it.static <T> Filter<T>
composeFilters
(Filter<T>... filters) Return a filter that will include elements if and only if all of the filters in the supplied array offilters
include it.
-
Method Details
-
composeFilters
Return a filter that will include elements if and only if all of the filters in the supplied array offilters
include it.If the array is empty, the returned filter will include all elements it is asked to filter.
- Parameters:
filters
- the array of filters to compose; nevernull
- See Also:
-
composeFilters
Return a filter that will include elements if and only if all of the filters in the supplied collection offilters
include it.If the collection is empty, the returned filter will include all elements it is asked to filter.
- Parameters:
filters
- the collection of filters to compose; nevernull
- See Also:
-
adaptFilter
Return a filter that will include elements if and only if the adaptedFilter
includes the value converted using the suppliedFunction
.- Parameters:
adaptee
- the filter to be adaptedconverter
- the converter function to apply
-
apply
Apply this filter to the supplied object. -
toPredicate
-