Class IndependentTreeFilter<E extends Element<E>>

  • All Implemented Interfaces:

    public abstract class IndependentTreeFilter<E extends Element<E>>
    extends BaseTreeFilter<E>
    A simple implementation of the TreeFilter interface that simply repeats the result provided from the start(Element) method in its finish(Element) method.

    This is what filters that do not depend on any other element usually need.

    • Constructor Detail

      • IndependentTreeFilter

        public IndependentTreeFilter()
    • Method Detail

      • start

        public final 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>>
        start in class BaseTreeFilter<E extends Element<E>>
        element - the element to start filtering
        a filter result informing the caller what was the result of filtering and whether to descend to children or not