public interface Filter<T>
|Modifier and Type||Method and Description|
If an element in a forest is of compatible type, does the filter apply to it?
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.
boolean applies(@Nullable T element)
element- the element in the forest
boolean shouldDescendInto(@Nullable Object element)
Therefore the filter is given a chance to influence the decision even for elements of types that it is not declared to filter.
element- the element to be descended into
Copyright © 2014-2020 Lukas Krejci. All Rights Reserved.