Class BaseTreeFilter<E extends Element<E>>

    • Constructor Detail

      • BaseTreeFilter

        public BaseTreeFilter()
    • Method Detail

      • start

        public FilterStartResult start​(E element)
        Description copied from interface: TreeFilter
        This method is called when an element is about to be filtered. After this call all the children will be processed (if the result instructs the caller to do so). Only after that, the TreeFilter.finish(Element) will be called with the same element as this method.
        Specified by:
        start in interface TreeFilter<E extends Element<E>>
        Parameters:
        element - the element to start filtering
        Returns:
        a filter result informing the caller what was the result of filtering and whether to descend to children or not
      • finish

        public FilterFinishResult finish​(E element)
        Description copied from interface: TreeFilter
        This method is called after the filtering has started and all children have been processed by this filter.

        Note that the result can still be Ternary.UNDECIDED. It is expected that such elements will in the end be resolved with the TreeFilter.finish() method.

        Specified by:
        finish in interface TreeFilter<E extends Element<E>>
        Parameters:
        element - the element for which the filtering has finished
        Returns:
        the result of filtering
      • finish

        public Map<E,​FilterFinishResult> finish()
        Description copied from interface: TreeFilter
        Called after all elements have been processed to see if any of them have changed in their filtering result (which could be the case if there are dependencies between elements other than that of parent-child).

        Note that the result can remain Ternary.UNDECIDED. It is upon the caller to then decide what to do with such elements.

        Specified by:
        finish in interface TreeFilter<E extends Element<E>>
        Returns:
        the final results for elements that were previously undecided if their filtering status changed