Class ElementPredicate
- java.lang.Object
-
- com.apple.foundationdb.record.query.predicates.ElementPredicate
-
- All Implemented Interfaces:
PlanHashable
,Bindable
,QueryPredicate
@API(EXPERIMENTAL) public class ElementPredicate extends Object implements QueryPredicate
AQueryPredicate
that evaluates aComparisons.Comparison
on the value of anElement
.An element predicate is a "leaf" in a predicate tree. It pairs an element, which can be evaluated with respect to a given
SourceEntry
, with a comparison. An element predicate evalutes to the result of the comparison on the value of the element.
-
-
Constructor Summary
Constructors Constructor Description ElementPredicate(Element element, Comparisons.Comparison comparison)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stream<PlannerBindings>
bindTo(ExpressionMatcher<? extends Bindable> matcher)
Attempt to match the matcher to this bindable object.boolean
equals(Object o)
<M extends Message>
Booleaneval(FDBRecordStoreBase<M> store, EvaluationContext context, SourceEntry sourceEntry)
Comparisons.Comparison
getComparison()
Element
getElement()
int
hashCode()
int
planHash()
Return a hash similar tohashCode
, but with the additional guarantee that is is stable across JVMs.String
toString()
-
-
-
Constructor Detail
-
ElementPredicate
public ElementPredicate(@Nonnull Element element, @Nonnull Comparisons.Comparison comparison)
-
-
Method Detail
-
getComparison
@Nonnull public Comparisons.Comparison getComparison()
-
eval
@Nullable public <M extends Message> Boolean eval(@Nonnull FDBRecordStoreBase<M> store, @Nonnull EvaluationContext context, @Nonnull SourceEntry sourceEntry)
- Specified by:
eval
in interfaceQueryPredicate
-
bindTo
@Nonnull public Stream<PlannerBindings> bindTo(@Nonnull ExpressionMatcher<? extends Bindable> matcher)
Description copied from interface:Bindable
Attempt to match the matcher to this bindable object.
-
planHash
public int planHash()
Description copied from interface:PlanHashable
Return a hash similar tohashCode
, but with the additional guarantee that is is stable across JVMs.- Specified by:
planHash
in interfacePlanHashable
- Returns:
- a stable hash code
-
-