|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcsheets.core.formula.Operation<BinaryOperator>
csheets.core.formula.BinaryOperation
public class BinaryOperation
A binary operation in a formula.
| Field Summary |
|---|
| Fields inherited from class csheets.core.formula.Operation |
|---|
operator |
| Constructor Summary | |
|---|---|
BinaryOperation(Expression leftOperand,
BinaryOperator operator,
Expression rightOperand)
Creates a new binary operation. |
|
| Method Summary | |
|---|---|
Object |
accept(ExpressionVisitor visitor)
Accepts to visit the given expression visitor. |
Value |
evaluate()
Evaluates the expression and returns the result. |
Expression |
getLeftOperand()
Returns the left(first) operand. |
Expression |
getRightOperand()
Returns the right(second) operand. |
String |
toString()
|
| Methods inherited from class csheets.core.formula.Operation |
|---|
getOperator |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public BinaryOperation(Expression leftOperand,
BinaryOperator operator,
Expression rightOperand)
leftOperand - the left(first) operandoperator - the binary operatorrightOperand - the right(second) operand| Method Detail |
|---|
public Value evaluate()
throws IllegalValueTypeException
Expression
IllegalValueTypeException - if a value of an unexpected type was
encountered when evaluating the expressionpublic Expression getLeftOperand()
public Expression getRightOperand()
public Object accept(ExpressionVisitor visitor)
Expression
visitor - the visitorpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||