|
||||||||||
| 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
csheets.core.formula.lang.ReferenceOperation
public class ReferenceOperation
A binary reference operation in a formula.
| Field Summary |
|---|
| Fields inherited from class csheets.core.formula.Operation |
|---|
operator |
| Constructor Summary | |
|---|---|
ReferenceOperation(Reference leftOperand,
RangeReference operator,
Reference rightOperand)
Creates a new reference operation. |
|
| Method Summary | |
|---|---|
Object |
accept(ExpressionVisitor visitor)
Accepts to visit the given expression visitor. |
int |
compareTo(Reference reference)
Compares the reference with the given reference for order. |
Value |
evaluate()
Evaluates the expression and returns the result. |
SortedSet<Cell> |
getCells()
Returns the cell addresses (or address) that the reference points to. |
Reference |
getLeftOperand()
Returns the left(first) operand. |
RangeReference |
getOperator()
Returns the operator. |
Reference |
getRightOperand()
Returns the right(second) operand. |
| Methods inherited from class csheets.core.formula.BinaryOperation |
|---|
toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ReferenceOperation(Reference leftOperand,
RangeReference operator,
Reference rightOperand)
leftOperand - the left(first) operandoperator - the reference operatorrightOperand - the right(second) operand| Method Detail |
|---|
public SortedSet<Cell> getCells()
Reference
getCells in interface Referencepublic RangeReference getOperator()
Operation
getOperator in class Operation<BinaryOperator>public Reference getLeftOperand()
BinaryOperation
getLeftOperand in class BinaryOperationpublic Reference getRightOperand()
BinaryOperation
getRightOperand in class BinaryOperationpublic Value evaluate()
Expression
evaluate in interface Expressionevaluate in interface Referenceevaluate in class BinaryOperation
public Object accept(ExpressionVisitor visitor)
throws ExpressionVisitorException
Expression
accept in interface Expressionaccept in class BinaryOperationvisitor - the visitor
ExpressionVisitorExceptionpublic int compareTo(Reference reference)
Reference
compareTo in interface ReferencecompareTo in interface Comparable<Reference>reference - the reference to be compared
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||