Class GenericIterCalc

java.lang.Object
mondrian.calc.impl.AbstractCalc
mondrian.calc.impl.GenericIterCalc
All Implemented Interfaces:
Calc, IterCalc, ListCalc

public abstract class GenericIterCalc extends AbstractCalc implements ListCalc, IterCalc
Adapter which computes a set expression and converts it to any list or iterable type.
Since:
Nov 7, 2008
Author:
jhyde
  • Constructor Details

    • GenericIterCalc

      protected GenericIterCalc(Exp exp)
      Creates a GenericIterCalc without specifying child calculated expressions.

      Subclass should override AbstractCalc.getCalcs().

      Parameters:
      exp - Source expression
    • GenericIterCalc

      protected GenericIterCalc(Exp exp, Calc[] calcs)
      Creates an GenericIterCalc.
      Parameters:
      exp - Source expression
      calcs - Child compiled expressions
  • Method Details

    • 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
    • evaluateList

      public TupleList evaluateList(Evaluator evaluator)
      Description copied from interface: ListCalc
      Evaluates an expression to yield a list of tuples.

      The list is immutable if Calc.getResultStyle() yields ResultStyle.MUTABLE_LIST. Otherwise, the caller must not modify the list.

      Specified by:
      evaluateList in interface ListCalc
      Parameters:
      evaluator - Evaluation context
      Returns:
      A list of tuples, never null.
    • evaluateIterable

      public TupleIterable evaluateIterable(Evaluator evaluator)
      Description copied from interface: IterCalc
      Evaluates an expression to yield an Iterable of members or tuples.

      The Iterable is immutable.

      Specified by:
      evaluateIterable in interface IterCalc
      Parameters:
      evaluator - Evaluation context
      Returns:
      An Iterable of members or tuples, never null.