public class ComparisonConstraint extends SelectorBasedConstraint
ComparisonConstraint implements a comparison constraint.| Constructor and Description |
|---|
ComparisonConstraint(DynamicOperand operand1,
Operator operator,
Value operand2,
SelectorImpl selector)
Creates a new comparison constraint.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
evaluate(ScoreNode[] row,
Name[] selectorNames,
EvaluationContext context)
Evaluates this constraint for the given row.
|
protected boolean |
evaluate(Value op1)
Evaluates this constraint for the given dynamic operand value
op1. |
getSelector, getSelectorIndexpublic ComparisonConstraint(DynamicOperand operand1, Operator operator, Value operand2, SelectorImpl selector)
operand1 - the dynamic operand.operator - the operator.operand2 - the static operand.selector - the selector for this constraint.public boolean evaluate(ScoreNode[] row, Name[] selectorNames, EvaluationContext context) throws IOException
row - the current row of score nodes.selectorNames - the selector names associated with row.context - the evaluation context.true if the row satisfies the constraint,
false otherwise.IOException - if an error occurs while evaluating the constraint.protected boolean evaluate(Value op1) throws RepositoryException
op1.op1 - the current value of the dynamic operand.true if the given value satisfies the constraint.RepositoryException - if an error occurs while converting the
values.Copyright © 2004–2024 The Apache Software Foundation. All rights reserved.