Class AddOperator
java.lang.Object
com.scriptbasic.executors.AbstractExpression
com.scriptbasic.executors.operators.AbstractOperator
com.scriptbasic.executors.operators.AbstractBinaryOperator
com.scriptbasic.executors.operators.AbstractBinaryFullCircuitOperator
com.scriptbasic.executors.operators.AbstractBinaryFullCircuitNumericOperator<java.lang.Double>
com.scriptbasic.executors.operators.AbstractBinaryFullCircuitHalfDoubleOperator
com.scriptbasic.executors.operators.AddOperator
- All Implemented Interfaces:
AnalysisResult,Evaluator,Expression
public class AddOperator extends AbstractBinaryFullCircuitHalfDoubleOperator
-
Constructor Summary
Constructors Constructor Description AddOperator() -
Method Summary
Modifier and Type Method Description protected RightValueoperateOnDoubleDouble(java.lang.Double a, java.lang.Double b)protected RightValueoperateOnLongLong(java.lang.Long a, java.lang.Long b)protected RightValueoperateOnValues(RightValue leftOperand, RightValue rightOperand)If any operand is a string then concatenate the stringsprotected java.lang.StringoperatorName()Methods inherited from class com.scriptbasic.executors.operators.AbstractBinaryFullCircuitHalfDoubleOperator
operateOnDoubleLong, operateOnLongDoubleMethods inherited from class com.scriptbasic.executors.operators.AbstractBinaryFullCircuitNumericOperator
evaluateOnMethods inherited from class com.scriptbasic.executors.operators.AbstractBinaryFullCircuitOperator
evaluate, getLeftOperandEvaluated, getRightOperandEvaluatedMethods 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
-
AddOperator
public AddOperator()
-
-
Method Details
-
operateOnDoubleDouble
- Specified by:
operateOnDoubleDoublein classAbstractBinaryFullCircuitNumericOperator<java.lang.Double>
-
operateOnLongLong
- Specified by:
operateOnLongLongin classAbstractBinaryFullCircuitNumericOperator<java.lang.Double>
-
operateOnValues
protected RightValue operateOnValues(RightValue leftOperand, RightValue rightOperand) throws BasicRuntimeExceptionIf any operand is a string then concatenate the strings- Overrides:
operateOnValuesin classAbstractBinaryFullCircuitNumericOperator<java.lang.Double>- Parameters:
leftOperand- parameterrightOperand- parameter- Returns:
- the concatenated string
- Throws:
BasicRuntimeException- in case of exception
-
operatorName
protected java.lang.String operatorName()- Specified by:
operatorNamein classAbstractBinaryFullCircuitNumericOperator<java.lang.Double>
-