Class AnyChildMatcher

    • Method Detail

      • matches

        @Nonnull
        public Stream<PlannerBindings> matches​(@Nonnull
                                               PlannerBindings outerBindings,
                                               @Nonnull
                                               List<? extends Bindable> children)
        Description copied from interface: ExpressionChildrenMatcher
        Apply this matcher to the children provided by the given iterator and produce a stream of possible bindings. If the match is not successful, produce an empty stream. Note that this method should not generally match to the children themselves; instead, it should delegate that work to one or more inner ExpressionMatchers.
        Specified by:
        matches in interface ExpressionChildrenMatcher
        Parameters:
        outerBindings - preexisting bindings supplied by the caller
        children - a list of references to the children of a planner expression
        Returns:
        a stream of the possible bindings from applying this match to the children in the given iterator
      • anyMatching

        @Nonnull
        public static AnyChildMatcher anyMatching​(@Nonnull
                                                  ExpressionMatcher<? extends Bindable> childMatcher)
        Get a matcher that tries to match any child with the given ExpressionMatcher.
        Parameters:
        childMatcher - an expression matcher to match any one of the children
        Returns:
        a matcher that tries to match any child with the given child matcher