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 the TreeFilter.
    A basic filter designed to work with element forests.
    Since:
    0.1
    Author:
    Lukas Krejci
    • Method Detail

      • shallow

        static <T> Filter<T> shallow​(Predicate<T> predicate)
        Deprecated.
      • deep

        static <T> Filter<T> deep​(Predicate<T> predicate)
        Deprecated.
      • 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