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, isDefinedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetChildren, isConstant, isDefinedprotected 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()
TopLevelClausegetValue in interface TopLevelClausepublic boolean evaluate()
throws DAP2ServerSideException
TopLevelClauseevaluate in interface TopLevelClauseDAP2ServerSideException - Thrown if the evaluation fails for any reason.public SubClause getLHS()
public java.util.List getRHS()
public int getOperator()
ExprParserConstantspublic void printConstraint(java.io.PrintWriter os)
printConstraint in interface Clause