@API(value=MAINTAINED) public class OrComponent extends AndOrComponent
QueryComponent
that is satisfied when any of its child components is satisfied.
For tri-valued logic:
true
, then true
.false
, then false
.null
.Constructor and Description |
---|
OrComponent(List<ExpressionRef<QueryComponent>> operands) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
boolean |
equalsWithoutChildren(PlannerExpression otherExpression) |
static OrComponent |
from(List<QueryComponent> operands) |
List<QueryComponent> |
getChildren()
Children for this component, at least 2 of them.
|
List<ExpressionRef<QueryComponent>> |
getChildrenRefs() |
Iterator<? extends ExpressionRef<? extends PlannerExpression>> |
getPlannerExpressionChildren()
Return an iterator of references to the children of this planner expression.
|
int |
hashCode() |
boolean |
isOr() |
int |
planHash()
Return a hash similar to
hashCode , but with the additional guarantee that is is stable across JVMs. |
String |
toString() |
void |
validate(Descriptors.Descriptor descriptor) |
QueryComponent |
withOtherChildren(List<QueryComponent> newChildren) |
asNestedWith, asUnnestedWith, evalMessage, evalMessageAsync, isAsync
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getChildren
eval, evalAsync, validate
combineHashes, iterablePlanHash, objectPlanHash, objectsPlanHash, planHash, planHash, planHashUnordered, stringHashUnordered
acceptPropertyVisitor, bindTo, getPlannerExpressionChildren
public OrComponent(@Nonnull List<ExpressionRef<QueryComponent>> operands)
public static OrComponent from(@Nonnull List<QueryComponent> operands)
public boolean isOr()
isOr
in class AndOrComponent
public QueryComponent withOtherChildren(List<QueryComponent> newChildren)
public boolean equalsWithoutChildren(@Nonnull PlannerExpression otherExpression)
public int planHash()
PlanHashable
hashCode
, but with the additional guarantee that is is stable across JVMs.public void validate(@Nonnull Descriptors.Descriptor descriptor)
@Nonnull public List<QueryComponent> getChildren()
@Nonnull public List<ExpressionRef<QueryComponent>> getChildrenRefs()
@Nonnull @API(value=EXPERIMENTAL) public Iterator<? extends ExpressionRef<? extends PlannerExpression>> getPlannerExpressionChildren()
PlannerExpression
Collections.emptyIterator()
is returned. The returned iterator should
be treated as an immutable object and may throw an exception if Iterator.remove()
is called.
The iterator must return its elements in a consistent order.getPlannerExpressionChildren
in interface PlannerExpression