Class OrConstraint
- java.lang.Object
-
- org.apache.jackrabbit.core.query.lucene.constraint.OrConstraint
-
- All Implemented Interfaces:
Constraint
public class OrConstraint extends Object implements Constraint
OrConstraint
implements an OR constraint.
-
-
Constructor Summary
Constructors Constructor Description OrConstraint(Constraint left, Constraint right)
Creates a new OR constraint.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
evaluate(ScoreNode[] row, Name[] selectorNames, EvaluationContext context)
Evaluates this constraint for the given row.
-
-
-
Constructor Detail
-
OrConstraint
public OrConstraint(Constraint left, Constraint right)
Creates a new OR constraint.- Parameters:
left
- the left operand.right
- the right operand.
-
-
Method Detail
-
evaluate
public boolean evaluate(ScoreNode[] row, Name[] selectorNames, EvaluationContext context) throws IOException
Evaluates this constraint for the given row.- Specified by:
evaluate
in interfaceConstraint
- Parameters:
row
- the current row of score nodes.selectorNames
- the selector names associated withrow
.context
- the evaluation context.- Returns:
true
if the row satisfies the constraint,false
otherwise.- Throws:
IOException
- if an error occurs while evaluating the constraint.
-
-