public class Sum extends BinaryExpression
myLeft, myRight, mySymbol
gelementsToValue
Constructor and Description |
---|
Sum(ArithmeticBase lhs,
ArithmeticBase rhs)
Represents an addition
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
toString()
Combine left/right subexpressions, return result using symbol as the
combiner/juxtaposer for the subexpressions.
|
double |
value(Context c) |
leftValue, rightValue
evaluate
public Sum(ArithmeticBase lhs, ArithmeticBase rhs)
lhs
- the left-hand side of the addition (before the +)rhs
- the right-hand side of the addition (after the +)public double value(Context c)
value
in class ArithmeticInstruction
public java.lang.String toString()
BinaryExpression
toString
in class BinaryExpression