Class AnyChildMatcher
- java.lang.Object
-
- com.apple.foundationdb.record.query.plan.temp.matchers.AnyChildMatcher
-
- All Implemented Interfaces:
ExpressionChildrenMatcher
@API(EXPERIMENTAL) public class AnyChildMatcher extends Object implements ExpressionChildrenMatcher
An expression children matcher that tries to match any child to the givenExpressionMatcher
, producing a stream of bindings that is the concatenation of the (possibly empty) streams of bindings from attempting to match each child to the given matcher.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AnyChildMatcher
anyMatching(ExpressionMatcher<? extends Bindable> childMatcher)
Get a matcher that tries to match any child with the givenExpressionMatcher
.Stream<PlannerBindings>
matches(List<? extends Bindable> children)
Apply this matcher to the children provided by the given iterator and produce a stream of possible bindings.
-
-
-
Method Detail
-
matches
@Nonnull public Stream<PlannerBindings> matches(@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 innerExpressionMatcher
s.- Specified by:
matches
in interfaceExpressionChildrenMatcher
- Parameters:
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 givenExpressionMatcher
.- 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
-
-