Class AmpersandOperator
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.AmpersandOperator
- All Implemented Interfaces:
AnalysisResult,Evaluator,Expression
public class AmpersandOperator extends AbstractBinaryFullCircuitOperator
Generates a string concatenation of two expressions.
If the data type of expression1 or expression2 is not String but widens to String,
it is converted to String. If either of the data types does not widen to String,
the compiler generates an error.
The data type of result is String. If one or both expressions evaluate to Nothing
or have null value, they are treated as a string with a value of "".
-
Constructor Summary
Constructors Constructor Description AmpersandOperator() -
Method Summary
Modifier and Type Method Description protected RightValueevaluateOn(RightValue leftOperand, RightValue rightOperand)Methods inherited from class com.scriptbasic.executors.operators.AbstractBinaryFullCircuitOperator
evaluate, getLeftOperandEvaluated, getRightOperandEvaluatedMethods inherited from class com.scriptbasic.executors.operators.AbstractBinaryOperator
getLeftOperand, getRightOperand, setLeftOperand, setRightOperand
-
Constructor Details
-
AmpersandOperator
public AmpersandOperator()
-
-
Method Details
-
evaluateOn
protected RightValue evaluateOn(RightValue leftOperand, RightValue rightOperand) throws ScriptBasicException- Specified by:
evaluateOnin classAbstractBinaryFullCircuitOperator- Throws:
ScriptBasicException
-