T
- the type of the matcher for the selected child@API(value=EXPERIMENTAL) public class AnyChildWithRestMatcher<T extends PlannerExpression> extends Object implements ExpressionChildrenMatcher
ExpressionMatcher
while providing a
ReferenceMatcher
binding to all other children. This can be quite useful when matching to a planner
expression that might have an unbounded number of children when a planner rule wants to inspect exactly one of those
children deeply. This matcher might produce several possible bindings because the ExpressionMatcher
for the
distinguished child might match several children.Modifier and Type | Method and Description |
---|---|
static <T extends PlannerExpression> |
anyMatchingWithRest(ExpressionMatcher<T> selectedChildMatcher,
ReferenceMatcher<? super T> otherChildrenMatcher) |
Stream<PlannerBindings> |
matches(Iterator<? extends ExpressionRef<? extends PlannerExpression>> childIterator)
Apply this matcher to the children provided by the given iterator and produce a stream of possible bindings.
|
@Nonnull public Stream<PlannerBindings> matches(@Nonnull Iterator<? extends ExpressionRef<? extends PlannerExpression>> childIterator)
ExpressionChildrenMatcher
ExpressionMatcher
s.matches
in interface ExpressionChildrenMatcher
childIterator
- an iterator of references to the children of a planner expression@Nonnull public static <T extends PlannerExpression> AnyChildWithRestMatcher<T> anyMatchingWithRest(@Nonnull ExpressionMatcher<T> selectedChildMatcher, @Nonnull ReferenceMatcher<? super T> otherChildrenMatcher)