public abstract class AbstractListCalc extends AbstractCalc implements ListCalc
ListCalc
interface.
The derived class must
implement the ListCalc.evaluateList(mondrian.olap.Evaluator)
method,
and the evaluate(mondrian.olap.Evaluator)
method will call it.
exp, type
Modifier | Constructor and Description |
---|---|
protected |
AbstractListCalc(Exp exp,
Calc[] calcs)
Creates an abstract implementation of a compiled expression which
returns a mutable list of tuples.
|
protected |
AbstractListCalc(Exp exp,
Calc[] calcs,
boolean mutable)
Creates an abstract implementation of a compiled expression which
returns a list.
|
Modifier and Type | Method and Description |
---|---|
Object |
evaluate(Evaluator evaluator)
Evaluates this expression.
|
TupleIterable |
evaluateIterable(Evaluator evaluator)
Evaluates an expression to yield an Iterable of members or tuples.
|
ResultStyle |
getResultStyle()
Returns style in which the result of evaluating this expression is
returned.
|
SetType |
getType()
Returns the type of this expression.
|
String |
toString() |
accept, anyDepends, anyDependsButFirst, butDepends, collectArguments, dependsOn, getArguments, getCalcs, getName, isWrapperFor, simplifyEvaluator, unwrap
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
evaluateList
accept, dependsOn, isWrapperFor, unwrap
protected AbstractListCalc(Exp exp, Calc[] calcs)
exp
- Expression which was compiledcalcs
- List of child compiled expressions (for dependency
analysis)protected AbstractListCalc(Exp exp, Calc[] calcs, boolean mutable)
exp
- Expression which was compiledcalcs
- List of child compiled expressions (for dependency
analysis)mutable
- Whether the list is mutablepublic SetType getType()
Calc
getType
in interface Calc
getType
in class AbstractCalc
public final Object evaluate(Evaluator evaluator)
Calc
public TupleIterable evaluateIterable(Evaluator evaluator)
IterCalc
The Iterable is immutable.
evaluateIterable
in interface IterCalc
evaluator
- Evaluation contextpublic ResultStyle getResultStyle()
Calc
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.
getResultStyle
in interface Calc
getResultStyle
in class AbstractCalc
ExpCompiler.compileList(mondrian.olap.Exp, boolean)
Copyright © 2020 Hitachi Vantara. All rights reserved.