csheets.core.formula
Interface Expression

All Superinterfaces:
Serializable
All Known Subinterfaces:
Reference
All Known Implementing Classes:
BinaryOperation, CellReference, Formula, FunctionCall, Literal, Operation, ReferenceOperation, TestCase, TestCaseParam, UnaryOperation

public interface Expression
extends Serializable

An expression in a formula, that can be evaluated and visited.

Author:
Einar Pehrson

Method Summary
 Object accept(ExpressionVisitor visitor)
          Accepts to visit the given expression visitor.
 Value evaluate()
          Evaluates the expression and returns the result.
 

Method Detail

evaluate

Value evaluate()
               throws IllegalValueTypeException
Evaluates the expression and returns the result.

Returns:
the result of the evaluation
Throws:
IllegalValueTypeException - if a value of an unexpected type was encountered when evaluating the expression

accept

Object accept(ExpressionVisitor visitor)
Accepts to visit the given expression visitor.

Parameters:
visitor - the visitor