public class RelOpClause extends AbstractClause implements TopLevelClause
Operator
,
ClauseFactory
Modifier and Type | Field and Description |
---|---|
protected SubClause |
lhs |
protected int |
operator |
protected java.util.List |
rhs |
protected boolean |
value |
children, constant, defined
Modifier | Constructor and Description |
---|---|
protected |
RelOpClause(int operator,
SubClause lhs,
java.util.List rhs)
Creates a new RelOpClause.
|
Modifier and Type | Method and Description |
---|---|
boolean |
evaluate()
Evaluates the clause, first calling evaluate() on any sub-clauses it
contains.
|
SubClause |
getLHS()
Returns a SubClause representing the right-hand side of the
comparison.
|
int |
getOperator()
Returns the type of comparison
|
java.util.List |
getRHS()
Returns a list of SubClauses representing the right-hand side of the
comparison.
|
boolean |
getValue()
Returns the current value of the clause.
|
void |
printConstraint(java.io.PrintWriter os)
Prints the original string representation of this clause.
|
getChildren, isConstant, isDefined
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getChildren, isConstant, isDefined
protected boolean value
protected int operator
protected SubClause lhs
protected java.util.List rhs
protected RelOpClause(int operator, SubClause lhs, java.util.List rhs) throws DAP2ServerSideException
operator
- The operator invoked by the clauselhs
- The left-hand side of the comparison.rhs
- A list of SubClauses representing the right-hand side of the
comparison.DAP2ServerSideException
- Thrown if the clause is constant, but
the attempt to evaluate it fails.public boolean getValue()
TopLevelClause
getValue
in interface TopLevelClause
public boolean evaluate() throws DAP2ServerSideException
TopLevelClause
evaluate
in interface TopLevelClause
DAP2ServerSideException
- Thrown if the evaluation fails for any reason.public SubClause getLHS()
public java.util.List getRHS()
public int getOperator()
ExprParserConstants
public void printConstraint(java.io.PrintWriter os)
printConstraint
in interface Clause