@API(value=EXPERIMENTAL) public class ElementPredicate extends Object implements QueryPredicate
QueryPredicate
that evaluates a Comparisons.Comparison
on the value of an Element
.
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 and Description |
---|
ElementPredicate(Element element,
Comparisons.Comparison comparison) |
Modifier and Type | Method and Description |
---|---|
Stream<PlannerBindings> |
bindTo(ExpressionMatcher<? extends Bindable> binding)
Attempt to match the binding to this bindable object.
|
boolean |
equals(Object o) |
<M extends Message> |
eval(FDBRecordStoreBase<M> store,
EvaluationContext context,
SourceEntry sourceEntry) |
Comparisons.Comparison |
getComparison() |
Element |
getElement() |
int |
hashCode() |
int |
planHash()
Return a hash similar to
hashCode , but with the additional guarantee that is is stable across JVMs. |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
combineHashes, iterablePlanHash, objectPlanHash, objectsPlanHash, planHash, planHash, planHashUnordered, stringHashUnordered
public ElementPredicate(@Nonnull Element element, @Nonnull Comparisons.Comparison comparison)
@Nonnull public Comparisons.Comparison getComparison()
@Nullable public <M extends Message> Boolean eval(@Nonnull FDBRecordStoreBase<M> store, @Nonnull EvaluationContext context, @Nonnull SourceEntry sourceEntry)
eval
in interface QueryPredicate
@Nonnull public Stream<PlannerBindings> bindTo(@Nonnull ExpressionMatcher<? extends Bindable> binding)
Bindable
public int planHash()
PlanHashable
hashCode
, but with the additional guarantee that is is stable across JVMs.planHash
in interface PlanHashable