Package mondrian.calc.impl
Class GenericIterCalc
java.lang.Object
mondrian.calc.impl.AbstractCalc
mondrian.calc.impl.GenericIterCalc
Adapter which computes a set expression and converts it to any list or
iterable type.
- Since:
- Nov 7, 2008
- Author:
- jhyde
-
Field Summary
Fields inherited from class mondrian.calc.impl.AbstractCalc
exp, type -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedGenericIterCalc(Exp exp) Creates a GenericIterCalc without specifying child calculated expressions.protectedGenericIterCalc(Exp exp, Calc[] calcs) Creates an GenericIterCalc. -
Method Summary
Modifier and TypeMethodDescriptionevaluateIterable(Evaluator evaluator) Evaluates an expression to yield an Iterable of members or tuples.evaluateList(Evaluator evaluator) Evaluates an expression to yield a list of tuples.getType()Returns the type of this expression.Methods inherited from class mondrian.calc.impl.AbstractCalc
accept, anyDepends, anyDependsButFirst, butDepends, collectArguments, dependsOn, getArguments, getCalcs, getName, getResultStyle, isWrapperFor, simplifyEvaluator, unwrapMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface mondrian.calc.Calc
accept, dependsOn, evaluate, getResultStyle, isWrapperFor, unwrap
-
Constructor Details
-
GenericIterCalc
Creates a GenericIterCalc without specifying child calculated expressions.Subclass should override
AbstractCalc.getCalcs().- Parameters:
exp- Source expression
-
GenericIterCalc
Creates an GenericIterCalc.- Parameters:
exp- Source expressioncalcs- Child compiled expressions
-
-
Method Details
-
getType
Description copied from interface:CalcReturns the type of this expression.- Specified by:
getTypein interfaceCalc- Overrides:
getTypein classAbstractCalc
-
evaluateList
Description copied from interface:ListCalcEvaluates an expression to yield a list of tuples.The list is immutable if
Calc.getResultStyle()yieldsResultStyle.MUTABLE_LIST. Otherwise, the caller must not modify the list.- Specified by:
evaluateListin interfaceListCalc- Parameters:
evaluator- Evaluation context- Returns:
- A list of tuples, never null.
-
evaluateIterable
Description copied from interface:IterCalcEvaluates an expression to yield an Iterable of members or tuples.The Iterable is immutable.
- Specified by:
evaluateIterablein interfaceIterCalc- Parameters:
evaluator- Evaluation context- Returns:
- An Iterable of members or tuples, never null.
-