|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cdx.scorebot.scoring.logic.ConditionalAndExpression
public class ConditionalAndExpression
holds a conditional AND expression
Constructor Summary | |
---|---|
ConditionalAndExpression(ConditionalXorExpression leftOperand)
instantiate the conditional OR expression |
Method Summary | |
---|---|
void |
and(ConditionalXorExpression operand)
evaluates this expression AND'ed with this operand |
static boolean |
evaluateAND(Context context,
Literal leftOperand,
java.util.Vector<ConditionalXorExpression> rightOperands)
Returns the short-circuit evaluation of the expression leftOperand && rightOperands[0] && rightOperands[1] ... |
Literal |
evaluateLogic(Context context)
evaluate this expression in the specified context |
LiteralType |
evaluateTypeOnly(java.util.HashMap<java.lang.String,LiteralType> varTypes,
java.util.HashMap<java.lang.String,TestData> testsInfo)
returns the kind of literal this evaluates to |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ConditionalAndExpression(ConditionalXorExpression leftOperand)
leftOperand
- left operandMethod Detail |
---|
public Literal evaluateLogic(Context context) throws LogicException
evaluateLogic
in interface LogicCodeEvaluatable
context
- contains the current context of the logic processor
TypeMismatchException
- thrown if an operand isn't of the required type
LogicException
- thrown if an exception occurs while processing the logicpublic static boolean evaluateAND(Context context, Literal leftOperand, java.util.Vector<ConditionalXorExpression> rightOperands) throws TypeMismatchException, LogicException
context
- contains the current context of the logic processorleftOperand
- the value on the left side of the AND operatorrightOperands
- the values being AND'ed together on the right side of the AND operator
TypeMismatchException
- thrown if an operand isn't of the required type
LogicException
- thrown if an exception occurs while processing the logicpublic LiteralType evaluateTypeOnly(java.util.HashMap<java.lang.String,LiteralType> varTypes, java.util.HashMap<java.lang.String,TestData> testsInfo) throws LogicException
LogicCodeEvaluatable
evaluateTypeOnly
in interface LogicCodeEvaluatable
varTypes
- contains the type of value stored by each variable (variables names are keys)testsInfo
- information about each test item keyed on test item names this logic may hold
LogicException
- thrown if there is a problem with type which prevents this from being evaluatedpublic void and(ConditionalXorExpression operand)
operand
- the operand to add to the expression
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |