|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcsheets.core.formula.Formula
public class Formula
A formula in a cell.
| Constructor Summary | |
|---|---|
Formula(Cell cell,
Expression expression)
Creates a new formula. |
|
| Method Summary | |
|---|---|
Object |
accept(ExpressionVisitor visitor)
Accepts to visit the given expression visitor. |
Value |
evaluate()
Evaluates the expression and returns the result. |
Cell |
getCell()
Returns the cell to which the formula belongs. |
Expression |
getExpression()
Returns the expression in the formula. |
SortedSet<Reference> |
getReferences()
Returns the references in the expression. |
boolean |
hasCircularReference()
Checks if the given formula has any circular references. |
String |
toString()
Returns a string representation of the formula. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Formula(Cell cell,
Expression expression)
cell - the cell to which the formula belongsexpression - the expression in the formula| Method Detail |
|---|
public Value evaluate()
throws IllegalValueTypeException
Expression
evaluate in interface ExpressionIllegalValueTypeException - if a value of an unexpected type was
encountered when evaluating the expressionpublic Object accept(ExpressionVisitor visitor)
Expression
accept in interface Expressionvisitor - the visitorpublic Cell getCell()
public Expression getExpression()
public SortedSet<Reference> getReferences()
public boolean hasCircularReference()
CircularReferenceException - if the formula contains any circular referencespublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||