Class TypeWithPredicateMatcher<T extends RelationalExpressionWithPredicate>
- java.lang.Object
-
- com.apple.foundationdb.record.query.plan.temp.matchers.TypeMatcher<T>
-
- com.apple.foundationdb.record.query.plan.temp.matchers.TypeWithPredicateMatcher<T>
-
- Type Parameters:
T
- the type ofRelationalExpressionWithPredicate
to match against
- All Implemented Interfaces:
ExpressionMatcher<T>
public class TypeWithPredicateMatcher<T extends RelationalExpressionWithPredicate> extends TypeMatcher<T>
Matches a subclass ofRelationalExpressionWithPredicate
with a given predicate (as determined byRelationalExpressionWithPredicate.getPredicate()
and a given matcher against the children.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Stream<PlannerBindings>
matchWith(RelationalExpression expression)
Attempt to match this matcher against the givenExpressionMatcher
.static <U extends RelationalExpressionWithPredicate>
TypeWithPredicateMatcher<U>ofPredicate(Class<? extends U> expressionClass, ExpressionMatcher<? extends QueryPredicate> predicateMatcher)
static <U extends RelationalExpressionWithPredicate>
TypeWithPredicateMatcher<U>ofPredicate(Class<? extends U> expressionClass, ExpressionMatcher<? extends QueryPredicate> predicateMatcher, ExpressionChildrenMatcher childrenMatcher)
static <U extends RelationalExpressionWithPredicate>
TypeWithPredicateMatcher<U>ofPredicate(Class<? extends U> expressionClass, ExpressionMatcher<? extends QueryPredicate> predicateMatcher, ExpressionMatcher<? extends Bindable>... children)
-
Methods inherited from class com.apple.foundationdb.record.query.plan.temp.matchers.TypeMatcher
getChildrenMatcher, getRootClass, matchWith, matchWith, matchWith, of, of, of
-
-
-
-
Method Detail
-
matchWith
@Nonnull public Stream<PlannerBindings> matchWith(@Nonnull RelationalExpression expression)
Description copied from interface:ExpressionMatcher
Attempt to match this matcher against the givenExpressionMatcher
. Note that implementations ofmatchWith()
should only attempt to match the given root with this planner expression and should not call into theExpressionChildrenMatcher
returned byExpressionMatcher.getChildrenMatcher()
or attempt to access children of the given expression.- Specified by:
matchWith
in interfaceExpressionMatcher<T extends RelationalExpressionWithPredicate>
- Overrides:
matchWith
in classTypeMatcher<T extends RelationalExpressionWithPredicate>
- Parameters:
expression
- a planner expression to match with- Returns:
- a stream of
PlannerBindings
containing the matched bindings, or an empty stream is no match was found
-
ofPredicate
public static <U extends RelationalExpressionWithPredicate> TypeWithPredicateMatcher<U> ofPredicate(@Nonnull Class<? extends U> expressionClass, @Nonnull ExpressionMatcher<? extends QueryPredicate> predicateMatcher)
-
ofPredicate
@SafeVarargs public static <U extends RelationalExpressionWithPredicate> TypeWithPredicateMatcher<U> ofPredicate(@Nonnull Class<? extends U> expressionClass, @Nonnull ExpressionMatcher<? extends QueryPredicate> predicateMatcher, @Nonnull ExpressionMatcher<? extends Bindable>... children)
-
ofPredicate
public static <U extends RelationalExpressionWithPredicate> TypeWithPredicateMatcher<U> ofPredicate(@Nonnull Class<? extends U> expressionClass, @Nonnull ExpressionMatcher<? extends QueryPredicate> predicateMatcher, @Nonnull ExpressionChildrenMatcher childrenMatcher)
-
-