public class BoolFunctionClause extends AbstractClause implements TopLevelClause
ClauseFactory| Modifier and Type | Field and Description |
|---|---|
protected BoolFunction |
function |
protected boolean |
value |
children, constant, defined| Modifier | Constructor and Description |
|---|---|
protected |
BoolFunctionClause(BoolFunction function,
java.util.List children)
Creates a new BoolFunctionClause.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
evaluate()
Evaluates the clause, first calling evaluate() on any sub-clauses it
contains.
|
BoolFunction |
getFunction()
Returns the server-side function invoked by this clause
|
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 BoolFunction function
protected boolean value
protected BoolFunctionClause(BoolFunction function, java.util.List children) throws DAP2ServerSideException
function - The function invoked by the clausechildren - A list of SubClauses, to be given as arguments
to the function. If all the arguments are constant, the function
clause will be flagged as constant, and evaluated immediatelyx.DAP2ServerSideException - Thrown if either 1) the function does not
accept the arguments given, or 2) the
clause is constant, and 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 BoolFunction getFunction()
public void printConstraint(java.io.PrintWriter os)
printConstraint in interface Clause