Interface Element

    • Method Detail

      • accept

        default void accept​(Consumer<? super Element> visitor)
        Accepts the visitor in children first way.
        Parameters:
        visitor -
      • accept

        <T> T accept​(BiFunction<? super Element,​Map<? extends Element,​T>,​T> visitor)
        Accepts a result producing visitor BiFunction. Passes to it a map of results collected from children, nulls are not included.
        Type Parameters:
        T -
        Parameters:
        visitor -
        Returns:
        result returned by the visitor.
      • dispatch

        default Object dispatch​(Object... targets)
        Creates a visitor dispatching elements to methods annotated with Handler. Methods may have one or two parameters taking Element and a map of children.
      • stream

        default Stream<Elementstream()
        Returns:
        Stream containing this element and its children.