Package org.revapi.query
Interface Filter<T>
-
- All Known Subinterfaces:
ElementFilter
- All Known Implementing Classes:
SimpleElementFilter
@Deprecated public interface Filter<T>
Deprecated.Filtering turned out to be not that usable and will be removed. This class has been superseded by theTreeFilter
.A basic filter designed to work with elementforests
.- Since:
- 0.1
- Author:
- Lukas Krejci
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description boolean
applies(T element)
Deprecated.If an element in a forest is of compatible type, does the filter apply to it?static <T> Filter<T>
deep(Predicate<T> predicate)
Deprecated.static <T> Filter<T>
shallow(Predicate<T> predicate)
Deprecated.boolean
shouldDescendInto(Object element)
Deprecated.Should the forest traversal descend into the provided element? It is not guaranteed that the element is of the type required by this parameter, but its children might be.
-
-
-
Method Detail
-
applies
boolean applies(@Nullable T element)
Deprecated.If an element in a forest is of compatible type, does the filter apply to it?- Parameters:
element
- the element in the forest- Returns:
- true if the filter applies, false otherwise
-
shouldDescendInto
boolean shouldDescendInto(@Nullable Object element)
Deprecated.Should the forest traversal descend into the provided element? It is not guaranteed that the element is of the type required by this parameter, but its children might be.Therefore the filter is given a chance to influence the decision even for elements of types that it is not declared to filter.
- Parameters:
element
- the element to be descended into- Returns:
- true if forest traversal should descend into the element, false otherwise
-
-