Class AbstractBinaryFullCircuitOperator
java.lang.Object
com.scriptbasic.executors.AbstractExpression
com.scriptbasic.executors.operators.AbstractOperator
com.scriptbasic.executors.operators.AbstractBinaryOperator
com.scriptbasic.executors.operators.AbstractBinaryFullCircuitOperator
- All Implemented Interfaces:
AnalysisResult,Evaluator,Expression
- Direct Known Subclasses:
AbstractBinaryFullCircuitNumericOperator,AbstractCompareOperator,AmpersandOperator
This class is extended by the operator classes that implement an operation
that evaluates both operand. These are usually the numeric operands, as
opposed to the logical 'and' and 'or' operators that evaluate the second
operand only if the first operand is true and/or false.
- Author:
- Peter Verhas date May 31, 2012
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal RightValueevaluate(Interpreter interpreter) protected abstract RightValueevaluateOn(RightValue leftOperand, RightValue rightOperand) protected RightValuegetLeftOperandEvaluated(Interpreter interpreter) Function used to evaluate left operand.protected RightValuegetRightOperandEvaluated(Interpreter interpreter) Function used to evaluate right operand.Methods inherited from class com.scriptbasic.executors.operators.AbstractBinaryOperator
getLeftOperand, getRightOperand, setLeftOperand, setRightOperandMethods inherited from class com.scriptbasic.executors.operators.AbstractOperator
getAsBoolean, getAsDouble, getAsLong, getAsObject, getAsString
-
Constructor Details
-
AbstractBinaryFullCircuitOperator
public AbstractBinaryFullCircuitOperator()
-
-
Method Details
-
getLeftOperandEvaluated
Function used to evaluate left operand. Override this function if custom evaluation is needed.- Parameters:
interpreter- current interpreter- Returns:
- evaluated operand
- Throws:
ScriptBasicException- when the evaluation of the operand cannot be performed w/o error
-
getRightOperandEvaluated
Function used to evaluate right operand. Override this function if custom evaluation is needed.- Parameters:
interpreter- current interpreter- Returns:
- evaluated operand
- Throws:
ScriptBasicException- when the evaluation of the operand cannot be performed w/o error
-
evaluateOn
protected abstract RightValue evaluateOn(RightValue leftOperand, RightValue rightOperand) throws ScriptBasicException - Throws:
ScriptBasicException
-
evaluate
- Throws:
ScriptBasicException
-