mondrian.calc.impl
Class AbstractIterCalc
java.lang.Object
mondrian.calc.impl.AbstractCalc
mondrian.calc.impl.AbstractIterCalc
- All Implemented Interfaces:
- Calc, IterCalc
- Direct Known Subclasses:
- CrossJoinFunDef.CrossJoinIterCalc, SetFunDef.ExprIterCalc
public abstract class AbstractIterCalc
- extends AbstractCalc
- implements IterCalc
Abstract implementation of the IterCalc interface.
The derived class must
implement the IterCalc.evaluateIterable(mondrian.olap.Evaluator) method,
and the evaluate(mondrian.olap.Evaluator) method will call it.
- Since:
- Oct 24, 2008
- Author:
- jhyde
- See Also:
AbstractListCalc
| Methods inherited from class mondrian.calc.impl.AbstractCalc |
accept, anyDepends, anyDependsButFirst, butDepends, collectArguments, dependsOn, getArguments, getCalcs, getName, isWrapperFor, simplifyEvaluator, unwrap |
AbstractIterCalc
protected AbstractIterCalc(Exp exp,
Calc[] calcs)
- Creates an abstract implementation of a compiled expression which returns
a
TupleIterable.
- Parameters:
exp - Expression which was compiledcalcs - List of child compiled expressions (for dependency
analysis)
getType
public SetType getType()
- Description copied from interface:
Calc
- Returns the type of this expression.
- Specified by:
getType in interface Calc- Overrides:
getType in class AbstractCalc
evaluate
public final Object evaluate(Evaluator evaluator)
- Description copied from interface:
Calc
- Evaluates this expression.
- Specified by:
evaluate in interface Calc
- Parameters:
evaluator - Provides dimensional context in which to evaluate
this expression
- Returns:
- Result of expression evaluation
getResultStyle
public ResultStyle getResultStyle()
- Description copied from interface:
Calc
- Returns style in which the result of evaluating this expression is
returned.
One application of this method is for the compiler to figure out
whether the compiled expression is returning a mutable list. If a mutable
list is required, the compiler can create a mutable copy.
- Specified by:
getResultStyle in interface Calc- Overrides:
getResultStyle in class AbstractCalc
- See Also:
ExpCompiler.compileList(mondrian.olap.Exp, boolean)
toString
public String toString()
- Overrides:
toString in class Object