|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object mondrian.calc.impl.AbstractCalc mondrian.calc.impl.AbstractListCalc
public abstract class AbstractListCalc
Abstract implementation of the ListCalc
interface.
The derived class must
implement the ListCalc.evaluateList(mondrian.olap.Evaluator)
method,
and the evaluate(mondrian.olap.Evaluator)
method will call it.
Field Summary |
---|
Fields inherited from class mondrian.calc.impl.AbstractCalc |
---|
exp, type |
Constructor Summary | |
---|---|
protected |
AbstractListCalc(Exp exp,
Calc[] calcs)
Creates an abstract implementation of a compiled expression which returns a mutable list. |
protected |
AbstractListCalc(Exp exp,
Calc[] calcs,
boolean mutable)
Creates an abstract implementation of a compiled expression which returns a list. |
Method Summary | |
---|---|
Object |
evaluate(Evaluator evaluator)
Evaluates this expression. |
List<Member> |
evaluateMemberList(Evaluator evaluator)
Evaluates an expression to yield a list of members. |
List<Member[]> |
evaluateTupleList(Evaluator evaluator)
Evaluates an expression to yield a list of tuples. |
Calc[] |
getCalcs()
Returns this expression's child expressions. |
ResultStyle |
getResultStyle()
Returns style in which the result of evaluating this expression is returned. |
Methods inherited from class mondrian.calc.impl.AbstractCalc |
---|
accept, anyDepends, anyDependsButFirst, butDepends, dependsOn, getArguments, getName, getType, simplifyEvaluator |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface mondrian.calc.ListCalc |
---|
evaluateList |
Methods inherited from interface mondrian.calc.Calc |
---|
accept, dependsOn, getType |
Constructor Detail |
---|
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 mutableMethod Detail |
---|
public Object evaluate(Evaluator evaluator)
Calc
evaluate
in interface Calc
evaluator
- Provides dimensional context in which to evaluate
this expression
public Calc[] getCalcs()
AbstractCalc
getCalcs
in class AbstractCalc
public 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)
public List<Member> evaluateMemberList(Evaluator evaluator)
MemberListCalc
The list is immutable if Calc.getResultStyle()
yields
ResultStyle.MUTABLE_LIST
. Otherwise,
the caller must not modify the list.
evaluateMemberList
in interface MemberListCalc
evaluator
- Evaluation context
public List<Member[]> evaluateTupleList(Evaluator evaluator)
TupleListCalc
Each tuple is represented by an array of members.
The list is immutable if Calc.getResultStyle()
yields
ResultStyle.MUTABLE_LIST
. Otherwise,
the caller must not modify the list.
evaluateTupleList
in interface TupleListCalc
evaluator
- Evaluation context
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |